Skip to content

Instantly share code, notes, and snippets.

@sweeneyrobb
Created January 1, 2016 00:53
Show Gist options
  • Save sweeneyrobb/3915df14843220ecf737 to your computer and use it in GitHub Desktop.
Save sweeneyrobb/3915df14843220ecf737 to your computer and use it in GitHub Desktop.
This script will export a WSP from the Configuration Database. Handy if you do not have access to the binaries during a migration.
$wspFile = "solution.wsp"
$outDir = "c:\temp"
$farm = Get-SPFarm
$wsp = $farm.Solutions.Item($wspFile).SolutionFile
$outFile = Join-Path -Path $outDir -ChildPath $wspFile
$wsp.SaveAs($outFile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment