Upgrading SharePoint 2013

SharePoint CU Upgrade process

Overview

ALWAYS USE THE INSTALL ACCOUNT – It will make your life a lot easier.
Download all CU files inc cab files and store in a single folder – See Step 1
Backup Everything – See Step 2
Confirm there are no pre-existing errors & gather information about environment such as Farm Administrator login details – See Step 3
Install the CU, DO NOT REBOOTSee Step 4
Run SharePoint Configuration Wizard, Start with the server hosting the Central Administration site. See Step 5
Complete Post Installation steps such as confirming there are no errors and all sites are responding as expected – See Step 6

1) Download the Cumulative Update package from Microsoft site

Download the exe & cab files, store in a single location.

https://docs.microsoft.com/en-us/officeupdates/sharepoint-updates

2) Take necessary backups:

a) Backup Sharepoint Farm

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} [-Verbose]

b) IIS backup.

IIS Configuration Files Backup – Location c:\Windows\System32\inetsrv\backup
Backup-WebConfiguration -Name MyIISBackup

c) Web.Conf Backup


Take a backup of the web. config file in IIS. This is the place where all the customizations are saved.
$webApp = Get-WebApplication
$backupDir = "C:\backups"
foreach ($webApp in $webApps)
{
$webappName = $_.DisplayName
Write-Host "Backing up $_.DisplayName web.config file…" -foreground Gray –nonewline
## You may wish to iterate through all the available zones
$zone = $webApp.AlternateUrls[0].UrlZone
## Get the collection of IIS settings for the zone
$iisSettings = $webApp.IisSettings[$zone]
## Get the path from the settings
$path = $iisSettings.Path.ToString() + "\web.config"
## copy the web.config file from the path
copy-item $path -destination $backupDir\$webappName
Write-Host "done" -foreground Green
}

d) (Optional) Backup Customizations


Optionally backup all the customizations in the farm if your SharePoint farm is heavily customized.
Backup-SPFarm -backupmethod full -directory <UNC location> -item "farm\solutions"

e) (Optional) Backup WSP Files

Backup all the WSP files that are deployed in the farm. This is not a mandatory step but if you feel that this is required, you can do this using the below mentioned PowerShell script.

$farm = Get-SPFarm
$file = $farm.Solutions.Item(“solution.wsp”).SolutionFile
$file.SaveAs(“c:\Solution.wsp”)

f) Snapshot VM

Finally once all the backups have been taken the most important thing to do is to have a Snapshot of all your SharePoint servers and if possible the backend SQL server too

New-Snapshot -VM <VM> -Name <Snapshot Name> -Description <Description> -Quiesce -Memory

3) Pre-Installation Steps

a) Run Robust Office Inventory Scan

There are certain pre-requisites that you need to do prior to installing the package and one of them is to run the “Robust Office Inventory Scan” script to find out the status of SharePoint/Office products installed in the server. The script will generate a log with which we can find if there is any patch or chained product missing. If so, you need to fix that issue first. If the log does not mention any errors under “Review items” section, youre ok to proceed. You can also download the script from the below mentioned link

https://gallery.technet.microsoft.com/office/68b80aba-130d-4ad4-aa45-832b1ee49602

b) Verify there are no errors

Ststadm.exe –o localupgradestatus

c) Suspend the Search Service

Once this is done and you verified that there are no errors reported under “Review items” section in the logs, please go ahead and suspend the “Search service “.
Note: Suspending the Search service is a very important step to do prior to installing the CU and failing to do so might break the search crawl. It may be possible that when you check, there is no crawl running. However, if a crawl is triggered by schedule which occurs during the installation, the search application may crash or lead to inadvertent results. In worst case, you might end up rebuilding the entire search application.

Hence, to make sure there is no crawl running currently and no crawl will be triggered during the installation, pause the search application. For this, open “SharePoint 2013 Management Shell” using the farm service account and then execute the below command

Get-SPEnterpriseSearchServiceApplication
Suspend-SPEnterpriseSearchServiceApplication –Identity “SearchServiceApplicationName”

 This command will take a couple of minutes to execute. Once it is executed, navigate to the search service application in CA and verify that its status is showing as “Paused: for external request” 

If you go to Content Sources, you should see the status as “Paused by system”.

d) Gather login information

Log in the with SharePoint Installation Account or Farm account for ALL OTHER STEPS

4) Installing the Cumulative Update Package:


Note: Installing the CU doesn’t require any specific order, you can do it on any server in the farm and then go on by installing it on other servers in the farm (meaning you can do it on the WFE server first and then on the APP server). However, that’s not the case when rebooting the server post the installation or when you are running the “SharePoint Configuration Wizard”. There is a specific order to be followed while doing that and I’ll be discussing in detail about that later in this article.
Please see Example Install before proceeding

a) Run the installation package

You need to run all the following steps under a Farm Administrator account (install account). Navigate to the folder where you have downloaded the package and double-click on the package to install it.
Note: It’s mandatory to keep all the three executables (package as well as Cabinet files) in the same folder.

b) Installation Steps

  1. On the “End user license agreement page”, select the accept check box and click continue.
  2. Now it will start the installation. It will start with extracting the files and the window may briefly disapear.
    Note: Installation will take around 20-60 minutes
  3. On the next screen, it will start loading the files
  4. On the next screen, it will start installing the packages
  5. Post installation, if it prompts for reboot, click NO.
  6. Finally, once the installation is complete, go to Control Panel and verify whether the package has been installed correctly. For some reason if it’s not showing up here you need to troubleshoot and identify what’s causing the trouble.

5) Running the SharePoint Configuration Wizard:


Once you have confirmed that the CU package has been installed successfully and it is showing up correctly under Control Panel now it is time to go ahead and run the SharePoint Configuration Wizard. However, before doing so I would like to talk a bit about the order to be followed while installing the CU.
As I previously mentioned in this article, it’s ok to go ahead and install the CU in any order on the server.

a)      Example Install

It’s advisable to do this on the WFE server first e.g.

  1. Ensure that the WFE is taken out of the Load balancer pool so that it’s not serving user traffic and then go ahead and install the CU and reboot the server.
  2. Once the server comes back online verify whether all the components have been installed correctly under Control Panel and the Central administration site is accessible. This is just to ensure that the installed CU didn’t do any harm to the server.
  3. Move onto Sharepoint configuration wizard once the above steps are complete – See notes below

Note: It is usually ok to lose a WFE but not an APP server.

If  you’re patching the farm during business hours (which might ideally not be the case unless it’s a TEST /UAT farm) then make sure that the server on which you’re installing the CU is taken out of the load balancer so that user traffic doesn’t go through that server. Therefore, the idea is to do it on the WFE servers first and then on the APP server.

Point to note while running the SharePoint Configuration Wizard:
Unlike the CU installation you can’t run the “SharePoint Configuration Wizard” in any order, it must be run on the server which is hosting “Central Administration” site first and then on the WFE and APP servers. 

It’s a 6-step process which might take an hour at the max (in an ideal scenario) to run and complete. Once it is completed successfully on the server, where CA is hosted, please try opening the CA site and make sure everything looks fine and make sure you’re able to access the SharePoint sites. If the CA site is not coming up, please stop right there and fix it. Without fixing the CA site issue, please don’t proceed further with running the Configuration wizard on the other servers. This is the basic thumb rule to be followed while patching a SharePoint farm.

b)      Run Customization Wizard

  1. Open SharePoint management shell with elevated permissions using the farm service account and run the mentioned command below.

    PSConfigUI.exe – Takes longer but a greater chance of success and better logging
    OR
    PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
    OR
    PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install
  2. It will take few seconds and start the upgrade process.
  3. It’s time to go for a coffee now as it will start running a series of 6 steps to finish the configuration.
  4. The configuration wizard will have 6 steps which will be executed one by one. It should complete all 6 steps successfully. If it fails somewhere in the middle, you will need to check the “PSDiagnostics Logs” in the ULS logs folder. Find the issue, fix it first and then run the above command once again. Once all the steps are completed successfully, you are done.
  5. Repeat the above iv) steps on all the servers in the farm.

Once the Configuration wizard is successfully done running all the 6-steps it’s time to go ahead and do some post-installation steps.

6) Post Installation steps:

a) Verify all the SharePoint and IIS services are up and running

$Services = “IIS Admin Service”, “World Wide Web Publishing Service”, “SharePoint Administration”, “SharePoint Search host Controller”, “SharePoint Timer Service”, “SharePoint Tracing Service”, “SharePoint User Code Host”, “AppFabric Caching Service”
Get-Service –Name $Services

b) Go to IIS Manager and verify application pools and sites are in running state.

c)      Open CA and the web applications and make sure they are opening fine

e.g.
CA = http://localhost:4353/

d) Check Version Numbers

Go to “Manage servers in the farm” section in CA, check for the version number of the Configuration database, and make sure it is showing the version number correctly. Ex: For January 2016 CU, it should show the version number as 15.0.4787.1000
Build Numbers

e) Check “Manage Servers in this Farm” for further steps

Check “Manage Servers in this farm” page in Central administration. This page will also tell you if you need to run the SharePoint Products Configuration Wizard on a server to complete the upgrade process. Make sure every server in your SharePoint farm is upgraded and displays the status as “No Action Required”.

f) Check Patch Status

You can check the patch status on each and every individual server with “Manage patch status page” (Central Administration >> Upgrade and Migration >> Check product and patch installation status)

g) Check Upgrade Status

Check the “Check upgrade status” page, which will give you the detailed information on upgrade status.

h) Resume Search Service

Finally, resume the search service application using the below mentioned PowerShell command

Resume-SPEnterpriseSearchServiceApplication –Identity “SearchServiceApplicationName”

i) Check Search Service

Verify search service application is not paused and it is in running state.

CA -> Service Applications -> Search Service Application

j) Kick start a full search crawl

Please go to the content sources section in the Search administration page and kick start a full-crawl.

k) Add servers back into Load Balancer pool

Now add the servers back to the Load balancer pool so that they start serving user traffic and try to load the SharePoint sites

L) Check site functionality

Check the custom functionalities in the site such as third party WSP’s, site features, custom web parts, custom site templates etc. and make sure everything works fine.

m) (Optional) Verify Patches

You could also run the ROIScan tool post the patching and verify the status of all the patches that has been installed and ensure that nothing is showing up under “Review items” section in the logs.

n) Patching Complete

Loading

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.