WSP Deployer: Deploy WSP SharePoint 2019 Solutions using PowerShell

deploy wsp sharepoint 2019

Today, we’re going to introduce a new PowerShell Script called “WSP SharePoint Deployer” that would help you to safely and easily install and deploy WSP SharePoint 2019 solutions on your farm with Backup, Rollback, Logging, and Versioning capabilities.


What’s WSP SharePoint Deployer?

The “WSP SharePoint Deployer” is a PowerShell Script that would help you to easily deploy WSP SharePoint 2019 with backup, rollback, logging, and versioning capabilities. It also supports SharePoint 2016,2013, and doesn’t require any additional configurations on your side!

install and deploy WSP SharePoint 2019 powershell

Why do you need to use WSP SharePoint Deployer?

To illustrate the key needs of “WSP SharePoint Deployer“, let’s first define the limitations of the current SharePoint deployment process.

1) No Backup

As you can see in the Solution Management, there is no option to perform a backup for all deployed solutions before applying a new release to allow the rollback.

SharePoint Solution Management
Install and deploy WSP SharePoint 2019 Solutions

We have already implemented a simple and smart PowerShell script that will help you to backup all deployed WSP solutions with versioning and log features to overcome this limitation in the SharePoint Solution Management.

2) No Tracking

Also, the SharePoint Solution Management doesn’t provide an option to track the whole history of the previous deployment operations to find out when these solutions were deployed and by whom!

Even if you check the solution properties, you will notice that it only shows the LAST operation without any additional information about the user who performed the deployment operation, or additional info about the previous deployment operations.

Moreover, to show the solution properties, you will need to click on each solution name one by one and I think it’s a silly task if you have many WSP solutions!

WSP SharePoint 2019 solution properties
Install and deploy WSP SharePoint 2019 Solutions

3) No Rollback

Besides the above limitations, there is no option to perform quick rollback in case the newly deployed solution is causing errors on your farm, and in this case, you will need to go back to the DEV team to get a copy of the previously deployed solutions. Of course, it will take more time to roll back and return your farm to its previous stable state!

So we decided to implement a new PowerShell script that provides several features like backup, deploy, rollback, logging, versioning to overcome such deployment issues that you might encounter while deploying a new release for the SharePoint WSP solutions on your farm.

install and deploy WSP SharePoint Solutions powershell

What’re the WSP SharePoint Deployer Features?

Below are the main features of our WSP SharePoint Deployer to install and deploy SharePoint solution packages on your farm in a safe, efficient and effective manner.

1) Support All SharePoint Versions

The WSP SharePoint Deployer was tested on multiple farms that have the following SharePoint versions installed:

  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.

2) Validate and Verify

When running WSP SharePoint Deployer, you will first be prompted to provide the required parameters such as the WSP folder path, the Web application, and the Overwrite parameters.

Once you provide the required information correctly, The Deployer will perform a quick check on the below requirements:

  • The SharePoint Timer Service is up and running.
  • The provided WSP Folder Path is found.
  • The SharePoint Web Application URL is valid.
  • The provided WSP Folder Path holds WSP files.

If everything is Ok, the WSP Deployer will show the below check process details.

deploy WSP SharePoint PowerShell

But if the provided parameter values were incorrect, a clear error message will appear and guide you to provide the correct values as explained below:

WSP Folder Path

If the provider folder path that holds the WSP files is not found or incorrect, you will receive the below error message.

bulk deploy WSP SharePoint PowerShell

WSP Files

Also, it checks and makes sure that the specified folder actually contains valid WSP files, and if it’s empty or there are no WSP files, you’ll get the below error message.

install and deploy wsp sharepoint 2019 using powershell

SharePoint Web Application URL

Again, If you have provided invalid or unfound SharePoint Web Application URL, you will get the below error message.

How to check if SharePoint site exists using PowerShell

SharePoint Timer Service Status

As a prerequisite for deploying WSP solutions, the SharePoint Timer Service must be running. So the WSP Deployer checks the status of SPTimerV4 and if it’s not running, it will tell you to start it.

To simplify this task, the WSP Deployer will open the Services automatically to allow you to manually check and run the SharePoint timer service.

Check if SharePoint Timer Service is running using PowerShell

We didn’t automate the startup of the Timer Service because in many cases it stopped due to a Login failure issue, and you have to provide the farm service account credential manually. so just make sure the SPTimerV4 is running and then rerun the WSP deployer again.

2) Confirm before proceeding

The WSP SharePoint Deployer provides also confirmation messages for each step will be performed on your farm. So once you submit the correct parameter values, you will receive a confirmation message to start the deployment process as shown below.

how to install and deploy WSP SharePoint PowerShell

Also, you will be asked to perform a rollback for the previously deployed WSP solutions or not. in case, the newly deployed release cause an issue on your farm!

rollback WSP SharePoints using PowerShell

3) Informative

When you run he WSP Deployer, you’ll get detailed information to keep track for each action will be applied on your farm such as:

  • The total number of all currently deployed WSP solutions on your farm.
get all wsp solutions deployed on sharepoint farm
  • List of all WSP files located in the provided folder, and how many WSP files you will deploy.
deploy WSP SharePoint PowerShell
  • Clear status for each WSP file.
deploy WSP SharePoint 2013 PowerShell

4) Backup before deploy

One of the main features of the WSP Deployer is performing a backup for all currently deployed WSP before installing a new release to allow the rollback process. Once the backup operation is finished, the root backup folder will be automatically opened as shown below.

extract all WSP SHarePoint Solutions using PowerShell

The backup operation mainly depends on our own script WSP-Extractor 1.4 which already published on the PowerShell Gallery and you can use this script independently without having to deploy a new release on your farm.

Backup All WSP solutions using PowerShell

For more details about the Backup operation, Please check Backup all WSP SharePoint Solutions using PowerShell

5) Versioning

After confirming the backup process for the currently deployed WSP solutions on your farm, you will find out a separate folder for each WSP solution named by the solution name has been automatically created to hold each backup of the WSP file.

Within each WSP folder, a new folder will be created for each backup, and this folder will be named according to the date and time of the backup process.

Therefore, you can easily revert to any previous WSP version based on the backup date.

backup wsp SharePoint solution with versioning

6) Quick Rollback

Once the new WSP solutions are deployed, you should first perform a quick smoke test to ensure that the newly deployed solutions have no negative impact on your farm.

So the WSP Deployer offers you to quickly roll back to the previously deployed version in case a newly deployed solution causes errors on your farm.

rollback and deploy WSP SharePoints using PowerShell

The rollback process will restore the WSP solutions backup that was already taken before performing the deployment process.

7) Logging

Once the deployment has been completed successfully, you will get a detailed log about the deployment operation with the below valuable information:

  • List of all deployed solutions with their status and scope.
  • Who performed the deployment operation.
  • When the deployment operation has been done.
  • The total number of the deployed WSP solutions.
get which user deploy WSP SharePoint 2019 solution

8) Ease to use

No additional configurations required on your side, you just need to install the WSP Deployer script then provide the correct parameter values to deploy your WSP solutions in a smart and seamless way.

deploy WSP SharePoint 2019 PowerShell

How to install WSP SharePoint Deployer?

To install the SharePoint WSP Deployer, you have to check first the below prerequisites:

Prerequisites

  • SharePoint Timer Service is up and running.
    • The WSP Deployer will inform you if the Timer service is not running, then it will open the Services automatically to start the Service manually.
Check if SharePoint Timer Service is running using PowerShell

Installation Steps

  1. On your SharePoint Server, open Windows PowerShell as Administrator.
run Windows PowerShell as Administrator
  1. Run the below cmdlet to Install WSP-Deployer script.
Install-Script -Name  WSP-Deployer
Install WSP SharePoint Deployer

If you have already installed the “WSP-Deployer” script before, and you would like to get the latest version, so you will need to reinstall the script again with the -force parameter as below:

Ex: Install-Script -Name WSP-Deployer -force

How to use WSP SharePoint Deployer?

After installing the “WSP-Deployer” script, you will be ready to install and deploy WSP SharePoint 2019 Solutions in an easy and safe way by following the below steps:

Install and deploy WSP SharePoint 2019 Solutions using PowerShell

  1. Type the below cmdlet to install and deploy WSP SharePoint 2019 Solutions using WSP Deployer.
WSP-Deployer
  1. The WSP Deployer will ask you to provide the below parameter values:
    • WSPPath: the folded path that hod the WSP files.
    • WebApplication: the web application that you would like to deploy your WSP solution on it.
    • Overwrite: Type True to overwrite the deployed WSP solution with the new one.
deploy WSP SharePoint 2016 PowerShell

For the Web application parameter, type “All” if you would like to deploy the WSP solutions on All web applications on your farm or specify the correct web application URL that you need to deploy your WSP solution on it.

  1. After providing the correct values, the WSP Deployer will ask you to confirm and start the deployment process. Click “Y” to start.
deploy WSP SharePoint PowerShell
  1. Now, the WSP Deployer will install the Backup module and list all the currently deployed Solutions on your farm.
  2. Click “Y” to take a backup for the currently deployed WSP solutions to enable the rollback process later.
how to install and deploy WSP SharePoint PowerShell
  1. Great, the WSP backup is taken, and the backup folder will be automatically opened.
extract all WSP SHarePoint Solutions using PowerShell
  1. Also, the deployment operation should be now starting properly to deploy all WSP SharePoint solutions on the specified path.
  2. Wait a moment until the deployment process completed successfully.
  3. Now, you will note that the Log file is opened automatically to show the status of the deployment process for each WSP solution.
SharePoint WSP backup and restore log
  1. Also, the SharePoint Solution Management Page will be opened automatically to make sure that the WSP solutions had been deployed successfully.
SharePoint Solution Management
Install and deploy WSP SharePoint 2019 Solutions
  1. Now you should perform a quick smoke test to make sure that the newly deployed solutions don’t encounter any errors.
  2. Go back to the Windows PowerShell, you will be asked to perform a quick rollback if the newly WSP solutions cause any kind of errors.
  3. If everything was ok, just click “N” to bypass the rollback process, Otherwise, if the newly deployed solutions cause any errors and you would like to quickly roll back to the previously deployed WSP version, just Click “Y” to start the rollback process.
rollback WSP SharePoints using PowerShell

As you can see, SharePoint deployment is now a safe, simple process where you can easily backup, track each deployment as well as you can rollback and downgrade to the previously deployed version in an effective and efficient way.


WSP Deployer Roadmap

Currently, we are working on another WSP-UnInstaller script that would help you uninstall WSP SharePoint Solutions with backup and rollback functionality and we are planning to add this new script to be a part of our WSP Deployer script.

Also, we’re planning to embed the WSP SharePoint Deployer as a module in the SharePoint Central Administration with Web Interface.


Conclusion

The WSP Deployer is a smart script that helps you to deploy WSP SharePoint solutions with backup and rollback functionality in a safe abd . It supports SharePoint 2013, 2016, and 2019 and provides logging and versioning for each SharePoint WSP release.

Applies to

The “WSP SharePoint Deployer” supports the following SharePoint versions:

  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.
See Also

Leave a Reply