Export/Import SharePoint farm solutions using PowerShell
In My environment we lost SharePoint updated code. We want migrate SharePoint from SP 2010 to SP2013. Simply I did Export all .WSP using following Script. Steps: -------- Export SharePoint 2010/2013 Farm Solutions: 1). Open SharePoint 2010/2013 Management Shell as administrator. 2). Create new folder in any drive (In my case create new folder in D drive with ExportWSP name ) 3). Type D: and type "cd ExportWSP" 4). Copy and run the following script. (Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)} 5). Go back to ExportWSP Folder, Here All SharePoint wsp export from SharePoint Farm. Import SharePoint 2010/2013 Farm Solutions: 1). Open SharePoint 2010/2013 Management Shell as administrator. 3). Type D: and type "cd ExportWSP" 4). Copy and run the following script. Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname} ...