I want to download/export all .wsp solution files from SharePoint 2007 farm in order to deploy them again on new environment. How can i export or download .wsp files? I don't want to extract .wsp files. I just want the copies of all .wsp files. How its possible?

3 Answers 3


Here is a generic idea

  1. Using stsadm -o enumsolutions get all installed solutions on the farm
  2. Then for each solution you need to download it using following technique

    [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=, Cult ure=neutral, PublicKeyToken=71e9bce111e9429c")

    [System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

After this you can extract the files from the configuration database:

$farm = [microsoft.sharepoint.administration.spfarm]::Local

$wsp = $farm.Solutions.Item("solutionname.wsp").SolutionFile




If you get an error adding SharePoint DLL which states

Could not load file or assembly 'microsoft.sharepoint, Version=

you can try using this script instead


and you can continue exporting the WSP from your 2007 environment

$farm = [microsoft.sharepoint.administration.spfarm]::Local
$wsp = $farm.Solutions.Item("documentmanagement.actions.wsp").SolutionFile

Reference: Running PowerShell on MOSS 2007


I realize that this post is quite old, however I just ran into this issue myself during a 2007 migration project. In my case, there were quite a few solutions and downloading each one manually wasn't exactly ideal for me. I created a folder "solutions" on the C: drive and modified the above script to download all solutions into that folder.

$farm = [microsoft.sharepoint.administration.spfarm]::Local
$solutions = $farm.Solutions
ForEach ($solution in $solutions) {
    $wsp = $farm.Solutions.Item($solution.Name).SolutionFile
    $file = "C:\solutions\" + $solution.Name

Hope this helps someone out there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.