top of page
Writer's pictureSubir Hazra

PowerShell Script to Quickly Download All WSP Packages in a SharePoint Farm

If you need to download all the WSP packages in a SharePoint farm, you can use a PowerShell script to automate the process. This script allows you to retrieve all the solution files in a single operation, saving you time and effort.


PowerShell Script:


# Specify the output folder where the WSP packages will be downloaded
$FolderPath = "c:\WSPDownloads" 
 
# Loop through each solution and download it
foreach ($solution in Get-SPSolution)  
{  
   $id = $Solution.SolutionID  
   $title = $Solution.Name  
   $filename = $Solution.SolutionFile.Name  

   # Download the solution file
   $solution.SolutionFile.SaveAs("$FolderPath\$filename")  
}

Instructions


  • Open SharePoint Management Shell: Launch the SharePoint Management Shell on one of the SharePoint servers in the farm.

  • Copy and Paste the PowerShell Script: Copy the provided PowerShell script and paste it into the SharePoint Management Shell.

  • Specify Output Folder: Update the `$FolderPath` variable with the desired destination folder where you want to save the downloaded WSP packages. Make sure to provide a valid file path.

PowerShell Script to Download All WSP Packages
PowerShell Script to Download All WSP Packages

  • Execute the Script: Run the script by pressing Enter. The script will loop through all the solutions in the farm, download them, and save them to the specified output folder.

  • Check Downloaded WSP Packages: Once the script completes execution, navigate to the output folder specified in `$FolderPath` to verify that all the WSP packages have been successfully downloaded.


By using the provided PowerShell script, you can quickly and efficiently download all the WSP packages in your SharePoint farm. This script automates the process and allows you to gather all the solution files in one operation, simplifying the management and maintenance of your SharePoint environment.

21 views0 comments

Comments


Disclaimer

Welcome to my professional blog! The articles shared here are based on my personal experiences and knowledge, intended to serve as a valuable reference for myself and to assist readers like you.

 

Kindly refrain from reproducing my content in any manner without obtaining my explicit permission. In the event that any article infringes upon copyright regulations, please don't hesitate to reach out to me. I appreciate your input and encourage you to share your insights or alternative solutions by leaving a comment. Your valuable contributions are highly appreciated!

Copyright © 2023 by SHAREPOINT INSIGHTS. All rights reserved.

bottom of page