In this post, we’re gonna provide an enhanced PowerShell Script “WSP SharePoint Extractor” that would help you to extract and backup all WSP SharePoint Solutions on your farm with versioning and logging capabilities.
- 1 What’s the WSP SharePoint Extractor?
- 2 Backup all WSP SharePoint Solutions Script
The WSP Extractor is a PowerShell Script for SharePoint on-premises that helps you to automatically build a version history with a detailed log for all deployed SharePoint solution packages (WSP).
The WSP SharePoint Extractor script was tested on multiple farms that have the following SharePoint versions installed:
- SharePoint 2019.
- SharePoint 2016.
- SharePoint 2013.
- SharePoint 2010.
In SharePoint Central Administration, you can find the list of all installed SharePoint farm solutions by navigating to System Setting > Farm Management > Manage Farm Solution as shown below:
As you can see on the SharePoint Farm Solution Management page, there is no option to take a backup of the currently deployed WSP SharePoint solutions before deploying a new release.
Also, if the newly deployed solution causes errors, and you need to roll back or restore the previous stable version, you will note that there is no option to roll back or restore the previous version of the deployed solution, and you have to do that operation manually.
So that to overcome these limitations, we have written a simple PowerShell script to backup all installed SharePoint solutions on your farm with logging and versioning capabilities, so you can revert and restore your solution to a specific stable version at any time. In a simple and well-organized way.
Below, we’re gonna list the main features and capabilities of our “WSP SharePoint Extractor” to extract and Backup all WSP SharePoint Solutions using PowerShell Script:
When you run “WSP SharePoint Extractor” PowerShell Script, it will list the total number of all installed WSP solutions, then list each solution with its status as shown below.
Confirm before proceeding
When installing the “WSP SharePoint Extractor” you will get first a confirmation message before performing the backup operation for all WSP SharePoint solutions on your farm.
When you confirm to perform a backup for the currently deployed WSP solutions on your farm, you will find out an independent folder for each WSP solution has been automatically created to hold each WSP backup.
Inside each WSP folder, a new folder will be created for Each backup will be taken, this folder will be named by the date and time of the backup operation, so you can easily revert back to any previous WSP version based on the backup date.
The root backup folder will be opened automatically, once the backup operation is done.
Independent Package for the Latest WSP Solutions
Besides the versioning history feature for each WSP solution, we are also caring about the rollback process for the previously deployed WSP solutions, so we created an independent backup folder called “01-Latest-WSPBackup” for the latest WSP solutions to can easily restore back the latest WSP backup to your farm.
Another nice feature in our script is generating a log file for each backup operation to save the below info:
- Who has performed the backup?
- When was the backup taken?
- How many solutions backed up from your farm?
Easy to use
You just need to install the script, call, confirm, and then the folder that hold backup will be opened directly without providing any parameters or apply any configuration.
As we have earlier mentioned, using the “WSP SharePoint Extractor” is very easy, and to export and backup all WSP SharePoint solutions, you just need to follow the below steps:
- Login to your SharePoint Server with a Farm Admin account.
- Run Windows PowerShell as Administrator.
- Run the below cmdlet to install “WSP SharePoint Extractor” PowerShell Script.
Install-Script -Name Backup-WSPSharePoint
Note: Install-Script runs on PowerShell 5.0 or later releases, for more details, Please check The term ‘Install-Module’ is not recognized
If you don’t have an internet connection on your server, you can manually download the .nupkg file, and install it as mentioned in the Manual Package Download
If you have an old version from the “WSP SharePoint Extractor” script, so try to reinstall it again with the -force
Ex: Install-Script -Name Export-DocLibVersions -force
- Once the script is installed, write the below cmdlet to run the script
- Click Y to confirm the backup operation, then click Enter to proceed.
- Now, the script will start to build the version hierarchy to store all deployed WSP SharePoint solutions.
- Once the script is finished, the backup root folder will be opened automatically as shown below.
In the nearest future, we’re planning to add the below features:
- Backup specific WSP SharePoint Solutions.
- Perform a backup before install/uninstall WSP solutions (Working on it).
- Option to specify the root folder path manually as you prefer (by default, it will be located in the C:\WSPSolutions-Backup).
We know that “Extracting all WSP SharePoint solutions” is not be a new idea! However, we believe that continuing to improve and add new features such as Logging and Version History would simplify and streamline the work of the SharePoint Administrators. and this completely satisfies us.