Blog IT

How to install SharePoint Cumulative Updates In Less Than An Hour in a SharePoint Farm Step by Step

This post will explain how you can speed up the installation of Cumulative Updates in a SharePoint farm step by step using PowerShell. Using PowerShell, you can greatly reduce the time it takes to update your SharePoint farm which can take several hours to complete if you use the traditional method of installing Cumulative Updates. The steps described in this post are valid for SharePoint 2013, SharePoint 2016 and SharePoint 2019.

This post assumes a single SharePoint server but if you have multiple SharePoint servers, you must follow these steps on all SharePoint servers in your farm.

Introduction

The SharePoint world is rapidly moving into the Cloud with SharePoint Online and Office 365, but some organizations are still not ready to move completely to Office 365 and SharePoint Online.

Upgrading to SharePoint 2019 that has support for a hybrid scenario can be a valid solution to allow a gradual move to the cloud.

Installing a SharePoint 2019 farm can be done in an automated way using PowerShell and AutoSPInstaller. One additional advantage of this installation process ensures that the SharePoint farm is installed with the latest updates, leaving the SharePoint farm updated and working properly (if you want to learn how to install a SharePoint 2019 farm in an automated way, click here and here).

To ensure that after the installation, the SharePoint server is kept always updated, we must ensure that both the Windows Updates and specially the SharePoint Cumulative Updates are properly installed.

Installing SharePoint Updates

To install the latest SharePoint Cumulative Updates in your farm, follow the following steps:

Download the SharePoint Cumulative Updates

All starts by downloading the latest SharePoint Cumulative Updates. To do that, you must download:

To stay up to date and download the latest updates, click here.

Backup SharePoint Farm and Configurations

Before applying the updates, you should perform the following backups:

The backup folder should be a shared folder on the network, accessible by both SharePoint and database servers.

Ensure the SharePoint Server VSS Writer service is started on the SharePoint server (not started automatically).

Ensure the SQL Server VSS Writer service is started on the database server.

For more details about SharePoint farm backup, click here, here and here

Install the Cumulative Updates in the SharePoint Farm (using PowerShell)

After downloading the latest updates and taking the necessary precautions, you are ready to install them in your SharePoint farm.

If you want to use the traditional method to update your farm, click here. If you want to learn the PowerShell way and speed up the installation of the Cumulative Updates in your SharePoint farm, read on!

To download the SharePoint Patch PowerShell script, click here. This script, written by Trevor Seward, is an improved version of a PowerShell script originally created by Russ Maxwell for SharePoint 2013.

The way this PowerShell script ensures that the SharePoint patch process time is reduced from 4 to 5 hours to less than one hour is by doing the following:

To start the installation process, open the SharePoint PowerShell window (run as administrator) and execute the following commands:

For SharePoint 2016 and 2019, a monthly Cumulative Update typically contains both the language independent (“sts” file) and the language dependent (“wssloc” file) packages. Sometimes, a Cumulative Update only includes the language independent package. If that is the case, and you already have the latest language dependent package installed, you can run the PowerShell command with the -OnlySTS switch parameter:

This will start the SharePoint farm update process (examples for SharePoint 2013 and SharePoint 2019).

For SharePoint 2013, SharePoint Server or SharePoint Foundation packages will be detected automatically and installed. The example below is for SharePoint 2013 Server.

For SharePoint 2016 and SharePoint 2019, both language independent and language dependent packages will be detected automatically and installed.

SharePoint 2019 farm update using PowerShell

Instead of taking hours to perform, the updates should be installed in less than one hour.

SharePoint 2019 farm update using PowerShell (installation complete)

A reboot to the server may be necessary.

Reboot to the server after Installation of the Cumulative Updates

Run SharePoint Products and Configuration Wizard

To finish the farm update process, you must ensure that after the updates are properly installed, you execute the SharePoint Products and Configuration Wizard that will ensure the following:

To start, run the SharePoint Products and Configuration Wizard and select Yes when prompted to reset IIS, SharePoint Administration and SharePoint Timer services.

SharePoint Products and Configuration Wizard

Depending on your environment, the process will take some minutes to execute the 10 steps of the process.

SharePoint Products and Configuration Wizard (Running)

After a few minutes, the SharePoint Products Configuration Wizard will finish executing, hopefully with success.

SharePoint Products and Configuration Wizard (Finished Successfully)

After clicking on Finish, the Central Administration will automatically be launched.

SharePoint 2019 Central Administration

Post-Installation Steps

To ensure that the farm was successfully updated, it is important to check that the Databases Upgrade Status page.

SharePoint 2019 Central Administration (Databases Upgrade Status – databases needing upgrade)d

If the page shows any database still needing upgrade (showing the “Database is in compatibility range and upgrade is recommended” status), some additional steps must be followed.

These steps must also be followed if you encounter the error below while running SharePoint Products and Configuration Wizard, saying that there is a mismatch between SharePoint installed version (after updating the farm) and the database schema version.

To ensure all databases are properly upgraded, follow the following steps:

Get-SPContentDatabase | Upgrade-SPContentDatabase

Psconfig.exe -cmd upgrade -inplace b2b -wait -force

To confirm the databases upgrade was successful, go back to the Databases Upgrade Status page. After the previous steps, all SharePoint databases were successfully upgraded.

SharePoint 2019 Central Administration (Databases Upgrade Status – Databases Upgraded)

To ensure the upgrade process was successfully finished, go to the Patch Status page and the Upgrade Status page.

SharePoint 2019 Central Administration (Patch Status)
SharePoint 2019 Central Administration (Upgrade Status)

Important Notes

Some important notes on using SharePoint Products and Configuration Wizard (PSCONFIGUI.EXE) and PSCONFIG.EXE (command line version):

For more details, check Stefan Goßner’s articles here and here.

Troubleshooting

During an update there are a few errors that can occur while the patch is being validated against your SharePoint environment before is starts being installed. The most common errors are the following:

Other errors can occur while trying to run SharePoint Products and Configuration Wizard after installing the patch:

Related Articles

To learn why your business should migrate to SharePoint Online and Office 365, click here and here.

If you want to convert your tenant’s root classic site into a modern SharePoint site, click here.

If you are a SharePoint administrator or a SharePoint developer who wants to learn more about how to install a SharePoint 2019 farm in an automated way using PowerShell, I invite you to click here and here.

If you prefer to use the traditional method to update your farm and want to learn all the steps and precautions necessary to successfully keep your SharePoint farm updated, click here.

If you want to learn how to upgrade a SharePoint 2013 farm to SharePoint 2019, click here and here.

If SharePoint 2019 is still not an option, you can learn more about how to install a SharePoint 2016 farm in an automated way using PowerShell, click here and here.

If you want to learn how to upgrade a SharePoint 2010 farm to SharePoint 2016, click here and here.

If you are new to SharePoint and Office 365 and want to learn all about it, take a look at these learning resources.

If you are work in a large organization who is using Office 365 or thinking to move to Office 365 and is considering between a single or multiple Office 365 tenants, I invite you to read this article.

If you want to know all about the latest SharePoint and Office 365 announcements from SharePoint Conference 2019, click here and here.

If your organization is still not ready to go all in to SharePoint Online and Office 365, a hybrid scenario may be the best choice. SharePoint 2019 RTM was recently announced and if you to learn all about SharePoint 2019 and all its features, click here.

Happy SharePointing!