Extract all WSP from Sharepoint farm

Hi All,Attached script will help you to take backup of all WSP installed in your farm.You need to specify the path where the WSP should be extracted. It will also generate .txt file with the names of WSP and show output in Powershell console.Hope this will help you !!If you like


​$dirName = "D:\Production Farm Backup\All_Prod_WSP\" 
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
    $title >> ".\WSP_List.txt" 
    try {  
        $solution.SolutionFile.SaveAs("$dirName\$filename")  
        Write-Host " – done" -foreground green  
    }  
    catch  
    {  
        Write-Host " – error : $_" -foreground red  
    }  
}

Comments

Popular posts from this blog

How to Improve Workflow Performance in SharePoint Server 2010

PowerShell Script to Check and Generate Report on Access Rights for a Specific User:

Disable Loopbackcheck using PowerShell