Backup all WSP SharePoint Solutions using PowerShell

export and backup SharePoint WSP powershell

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.


What’s the WSP SharePoint Extractor?

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).

backup all SharePoint WSP Solutions deployed on SharePoint farm
Extract and Backup all WSP SharePoint Solutions

Supported SharePoint Versions

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.

Backup all WSP SharePoint Solutions Script

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:

backup all WSP sharepoint farm solutions using PowerShell

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.

The WSP SharePoint Extractor Features

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:

Informative

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.

Get the count of all WSP solutions in SharePoint Farm
Backup all WSP SharePoint Solutions

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.

Confirm backup all wsp solutions in SharePoint 2019 using PowerShell

Versioning

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.

backup all WSP SharePoint with version control
Backup all WSP SharePoint Solutions with versioning

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.

backup all SharePoint solutions in your farm

Logging

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?
log backup for all WSP SharePoint solutions

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.

Backup-WSPSharePoint
Backup all WSP SharePoint Solutions with versioning

How to use WSP SharePoint Extractor PowerShell Script?

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:

  1. Login to your SharePoint Server with a Farm Admin account.
  2. Run Windows PowerShell as Administrator.
run windows PowerShell as Administrator
  1. Run the below cmdlet to install “WSP SharePoint Extractor” PowerShell Script.
Install-Script -Name Backup-WSPSharePoint
install script from PowerShell Gallery

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

  1. Once the script is installed, write the below cmdlet to run the script
Backup-WSPSharePoint
Backup-WSPSharePoint
Backup all WSP SharePoint Solutions PowerShell
  1. Click Y to confirm the backup operation, then click Enter to proceed.
  2. Now, the script will start to build the version hierarchy to store all deployed WSP SharePoint solutions.
  3. Once the script is finished, the backup root folder will be opened automatically as shown below.
extract all WSP SharePoint Solution PowerShell
Extract and Backup all WSP SharePoint Solutions with versioning

Roadmap

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).
backup all SharePoint WSP Solutions deployed on SharePoint farm

Conclusion

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.

See Also

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top