RSS

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

17 Aug

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: , , , , , , , , ,

5 responses to “Export and/or Import All Farm Solutions in SharePoint 2010/2013 Farm using PowerShell

  1. 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.

       
  2. Eyad Takrouri

    July 30, 2013 at 3:34 am

    Thanks a lot Ali, I’ve tried it and it worked perfectly

     
  3. Stefan

    October 20, 2014 at 10:00 am

    Great post!!

     
  4. hasni501

    October 23, 2014 at 8:54 pm

    Reblogged this on hasni501.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: