Sometimes you may need to export all SharePoint 2010/2013 farm solutions as a backup process or to deploy them from staging environment to production environment.
Export Farm Solutions
- Create a backup folder on “C” and give it a meaningful name like “SP2010 Farm Solutions Backup”.
- Open SharePoint 2010 Management Shell
- Change directory or navigate to backup folder
- Enter the following Script to extract all farm solution to current location directory
(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)} - Go and open the target folder to see all exported solutions
Import Farm Solutions
After copy the folder that contains exported solution on production or target farm server.
- Open SharePoint 2010 Management Shell
- Change directory or navigate to folder that contains all solutions to be deployed
- Enter the following Script to extract all farm solution to current location directoryGet-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}
- So all solutions are added to the target farm.
For more information about adding and deploying SP2010 Farm solution, please to open and read Adding and Deploying SharePoint 2010 .WSP Solutions
Same scripts can be used for SharePoint 2013 Farm Solution
I Hope this useful for you,
Thanks.
Ammar
March 15, 2013 at 12:07 am
thanks for the Article Ali. 🙂 it will ease up our life.
Ali Nimer
March 15, 2013 at 12:12 am
Thanks Ammar for your support, and tell me if you face any problem or issue to write about and share it with others.
Eyad Takrouri
July 30, 2013 at 3:34 am
Thanks a lot Ali, I’ve tried it and it worked perfectly
Stefan
October 20, 2014 at 10:00 am
Great post!!
hasni501
October 23, 2014 at 8:54 pm
Reblogged this on hasni501.