RSS

Tag Archives: Export

Export and/or Import All Farm Solutions in SharePoint 2010/2013 Farm using PowerShell


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

  1. Create a backup folder on “C” and give it a meaningful name like “SP2010 Farm Solutions Backup”.image
  2. Open SharePoint 2010 Management Shell
     image
  3. Change directory or navigate to backup folder
     image
  4. 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)}
     


    image

    image

  5. Go and open the target folder to see all exported solutions Smile

Import Farm Solutions

After copy the folder that contains exported solution on production or target farm server.

  1. Open SharePoint 2010 Management Shell
  2. Change directory or navigate to folder that contains all solutions to be deployed
  3. Enter the following Script to extract all farm solution to current location directoryGet-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

     image
  4. 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.

 

Tags: , , , , , , , , ,