Extract all solutions from SharePoint 2010 using Powershell

Using the following Powershell command, you can extract & save all solutions in SharePoint to your local drive:

(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)}

This will extract all solutions to the current folder.

Update: If needed, you can use this script to add all the solutions to SharePoint (run it from the directory where the solutions are located)

Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>