Hey Everyone,

Today i will post a script very helpful when you are on Migration steps and you need export all wsp solutions.

 

$dirName = "C:\WSP"
if (!(Test-Path -path $dirName))
{
New-Item $dirName -type directory
}
Write-Host Exporting solutions to $dirName
foreach ($solution in Get-SPSolution)
{
    $id = $Solution.SolutionID
    $title = $Solution.Name
    $filename = $Solution.SolutionFile.Name
    Write-Host "Exporting ‘$title’ to …$filename" -nonewline
    try {
        $solution.SolutionFile.SaveAs("$dirName$filename")
        Write-Host " – done" -foreground green
    }
    catch
    {
        Write-Host " – error : $_" -foreground red
    }
}

Thanks

Fábio Carvalho
SharePoint Consultant
|create|it|

11 COMMENTS

  1. Hey there I am so glad I found your site, I really found you by accident, while I was researching on Aol for something else, Anyhow I am here now and would just like to say thanks for a tremendous post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the fantastic work.

    Server 2016 Migration Experts

  2. This is very serious, You’re associate passing qualified author. I actually have signed up along with your feed and in addition can relish finding your personal marvellous write-ups. Incidentally, we’ve shared your net journal in our social networks.

    Server 2016 Support

LEAVE A REPLY

Please enter your comment!
Please enter your name here