Step-by-step Cumulative Update SharePoint 2013

admin July 6th, 2015

Cumulative Update SharePoint 2013

The first time is always the hardest (and most stressful). I remember the first time I patched a multiple server SharePoint environment for a user base of over 500 users with the Cumulative Update SharePoint 2013 – I was petrified. I researched long and hard but could only find bits and pieces and reached a good level of confidence but a level of nervousness remained.

This post is for the guy who has been asked to update a farm environment for the first time (and probably during a late night session … alone). The following details step-by-step the process of installing the SharePoint Server Cumulative Update (September 2014) including the pre-requisite SharePoint Server 2013 Service Pack 1.

The following is a check list of things to get ready beforehand:

  1. Complete enterprise Change Request requirements including ensuring Server Administrator resources are available during the change window to restore server backups
  2. Schedule server backups prior to the change request

Part 1: SharePoint 2013 Service Pack 1 Installation Process

  1. Log in as the SharePoint Farm service account
  2. Download SharePoint Server 2013 Service Pack 1 binary via https://support.microsoft.com/kb/2880552
    • officeserversp2013-kb2880552-fullfile-x64-en-us.exe
  3. Run the powershell script detailed at the end of this post (as per MSDN blog: https://blog.russmax.com/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install/)
    • Ensure patch.ps1 and above binaries are in the same directory
  4. Ensure search content crawls are disabled (Idle)
    Step-by-step Cumulative Update SharePoint 2013_1

 

  1. Execute patch.ps1 script on all SharePoint application and web front end servers (as this is a binary update, the updates on the servers can be done concurrently)
    Step-by-step Cumulative Update SharePoint 2013_2This may take a few minutes…
    Step-by-step Cumulative Update SharePoint 2013_3
    This may take a while…(up to 20 minutes)
    Step-by-step Cumulative Update SharePoint 2013_4
    Complete…
    Step-by-step Cumulative Update SharePoint 2013_5
  2. Repeat until installation of binaries above complete on all servers
  3. Run the SharePoint 2013 Products Configuration Wizard (in the following order)
    • Application Server
    • Web Front End

    Step-by-step Cumulative Update SharePoint 2013_6
    Click Next>
    Step-by-step Cumulative Update SharePoint 2013_7
    Click Next>
    Step-by-step Cumulative Update SharePoint 2013_8
    Click Yes>
    Step-by-step Cumulative Update SharePoint 2013_9
    Click Next>
    Step-by-step Cumulative Update SharePoint 2013_10
    This may take a while…(up to 50 minutes per server)
    Step-by-step Cumulative Update SharePoint 2013_11
    Complete…

  4. Verify Build Number in Upgrade and Migration under Check product and patch installation status in Central Administration
    Step-by-step Cumulative Update SharePoint 2013_12
  5. Verify Upgrade Status in Upgrade and Migration under Check upgrade status in Central Administration
    Step-by-step Cumulative Update SharePoint 2013_13

Part 2: Cumulative Update SharePoint 2013 – Installation Process

  1. Log in as the SharePoint Farm service account
  2. Download SharePoint Server 2013 Cumulative Update September 2014 binary viahttps://support2.microsoft.com/kb/2883068
    • 478311_intl_x64_zip.exe, 478312_intl_x64_zip.exe
    • 478313_intl_x64_zip.exe
  3. Run the powershell script detailed at the end of this post (as per MSDN blog:https://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx)
    • Ensure patch.ps1 and above binaries are in the same directory
  4. Ensure search content crawls are disabled (Idle)
    Step-by-step Cumulative Update SharePoint 2013_14
  5. Execute patch.ps1 script on all SharePoint application and web front end servers (as this is a binary update, the updates on the servers can be done concurrently)
    Step-by-step Cumulative Update SharePoint 2013_15
    This may take a few minutes…
    Step-by-step Cumulative Update SharePoint 2013_16
    Step-by-step Cumulative Update SharePoint 2013_17
    Step-by-step Cumulative Update SharePoint 2013_18
    This may take a while…(up to 25 minutes)
    Step-by-step Cumulative Update SharePoint 2013_19
    Complete…
    Step-by-step Cumulative Update SharePoint 2013_20
  6. Repeat until installation of binaries above complete on all servers
  7. Run the SharePoint 2013 Products Configuration Wizard (in the following order)
    • Application Servers
    • Web Frond End Servers

    Step-by-step Cumulative Update SharePoint 2013_21
    Click Next>
    Step-by-step Cumulative Update SharePoint 2013_22
    Click Yes>
    Step-by-step Cumulative Update SharePoint 2013_23
    Click Next>
    Step-by-step Cumulative Update SharePoint 2013_24
    This may take a while…(up to 50 minutes per server)
    Step-by-step Cumulative Update SharePoint 2013_25

  8. Verify Build Number in Upgrade and Migration under Check product and patch installation status in Central Administration
    Step-by-step Cumulative Update SharePoint 2013_26
  9. Verify Upgrade Status in Upgrade and Migration under Check upgrade status in Central Administration
    Step-by-step Cumulative Update SharePoint 2013_27
Resources:
						
Below is the patch.ps1 file as referenced from https://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx
<#============================================================ 
  //  
  // Microsoft provides programming examples for illustration only,  
  // without warranty either expressed or implied, including, but not  
  // limited to, the implied warranties of merchantability and/or  
  // fitness for a particular purpose.  
  //  
  // This sample assumes that you are familiar with the programming  
  // language being demonstrated and the tools used to create and debug  
  // procedures. Microsoft support professionals can help explain the  
  // functionality of a particular procedure, but they will not modify  
  // these examples to provide added functionality or construct  
  // procedures to meet your specific needs. If you have limited  
  // programming experience, you may want to contact a Microsoft  
  // Certified Partner or the Microsoft fee-based consulting line at  
  //  (800) 936-5200 .  
  //  
  // For more information about Microsoft Certified Partners, please  
  // visit the following Microsoft Web site:  
  // https://partner.microsoft.com/global/30000104  
  //  
  // Author: Russ Maxwell (russmax@microsoft.com)  
  //  
  // ---------------------------------------------------------- #> 
  
###########################  
##Ensure Patch is Present##  
###########################  

$patchfile = Get-ChildItem | where{$_.Extension -eq ".exe"}  
if($patchfile -eq $null)  
{  
  Write-Host "Unable to retrieve the file.  Exiting Script" -ForegroundColor Red  
  Return  
}  

########################  
##Stop Search Services##  
########################  
##Checking Search services##  
$srchctr = 1  
$srch4srvctr = 1  
$srch5srvctr = 1 
$srv4 = get-service "OSearch15"  
$srv5 = get-service "SPSearchHostController" 
If(($srv4.status -eq "Running") -or ($srv5.status-eq "Running"))  
  {  
    Write-Host "Choose 1 to Pause Search Service Application" -ForegroundColor Cyan  
    Write-Host "Choose 2 to leave Search Service Application running" -ForegroundColor Cyan  
    $searchappresult = Read-Host "Press 1 or 2 and hit enter"  
    Write-Host  
    
   if($searchappresult -eq 1)  
    {  
        $srchctr = 2  
        Write-Host "Pausing the Search Service Application" -foregroundcolor yellow  
        Write-Host "This could take a few minutes" -ForegroundColor Yellow  
        $ssa = get-spenterprisesearchserviceapplication  
        $ssa.pause()  
    }  
    
    elseif($searchappresult -eq 2)  
    {  
        Write-Host "Continuing without pausing the Search Service Application"  
    }  
    else  
    {  
        Write-Host "Run the script again and choose option 1 or 2" -ForegroundColor Red  
        Write-Host "Exiting Script" -ForegroundColor Red  
        Return  
    }  
  } 
Write-Host "Stopping Search Services if they are running" -foregroundcolor yellow  
if($srv4.status -eq "Running")  
  {  
    $srch4srvctr = 2  
    set-service -Name "OSearch15" -startuptype Disabled  
    $srv4.stop()  
  } 
if($srv5.status -eq "Running")  
  {  
    $srch5srvctr = 2  
    Set-service "SPSearchHostController" -startuptype Disabled  
    $srv5.stop()  
  } 
do  
  {  
    $srv6 = get-service "SPSearchHostController"  
    if($srv6.status -eq "Stopped")  
    {  
        $yes = 1  
    }  
    Start-Sleep -seconds 10  
  }  
  until ($yes -eq 1) 
Write-Host "Search Services are stopped" -foregroundcolor Green  
Write-Host 

#######################  
##Stop Other Services##  
#######################  
Set-Service -Name "IISADMIN" -startuptype Disabled  
Set-Service -Name "SPTimerV4" -startuptype Disabled  
Write-Host "Gracefully stopping IIS W3WP Processes" -foregroundcolor yellow  
Write-Host  
iisreset -stop -noforce  
Write-Host "Stopping Services" -foregroundcolor yellow  
Write-Host 
$srv2 = get-service "SPTimerV4"  
  if($srv2.status -eq "Running")  
  {$srv2.stop()} 
Write-Host "Services are Stopped" -ForegroundColor Green  
Write-Host  
Write-Host 

##################  
##Start patching##  
##################  
Write-Host "Patching now keep this PowerShell window open" -ForegroundColor Magenta  
Write-Host  
$starttime = Get-Date 
$filename = $patchfile.basename  
$arg = "/passive" 
Start-Process $filename $arg 
Start-Sleep -seconds 20  
$proc = get-process $filename  
$proc.WaitForExit() 
$finishtime = get-date  
Write-Host  
Write-Host "Patch installation complete" -foregroundcolor green  
Write-Host 
 
##################  
##Start Services##  
##################  
Write-Host "Starting Services Backup" -foregroundcolor yellow  
Set-Service -Name "SPTimerV4" -startuptype Automatic  
Set-Service -Name "IISADMIN" -startuptype Automatic 
##Grabbing local server and starting services##  
$servername = hostname  
$server = get-spserver $servername 
$srv2 = get-service "SPTimerV4"  
$srv2.start()  
$srv3 = get-service "IISADMIN"  
$srv3.start()  
$srv4 = get-service "OSearch15"  
$srv5 = get-service "SPSearchHostController" 

###Ensuring Search Services were stopped by script before Starting###  
if($srch4srvctr -eq 2)  
{  
    set-service -Name "OSearch15" -startuptype Automatic  
    $srv4.start()  
}  
if($srch5srvctr -eq 2)  
{  
    Set-service "SPSearchHostController" -startuptype Automatic  
    $srv5.start()  
} 

###Resuming Search Service Application if paused###  
if($srchctr -eq 2)  
{  
    Write-Host "Resuming the Search Service Application" -foregroundcolor yellow  
    $ssa = get-spenterprisesearchserviceapplication  
    $ssa.resume()  
} 
Write-Host "Services are Started" -foregroundcolor green  
Write-Host  
Write-Host  
Write-Host "Script Duration" -foregroundcolor yellow  
Write-Host "Started: " $starttime -foregroundcolor yellow  
Write-Host "Finished: " $finishtime -foregroundcolor yellow  
Write-Host "Script Complete" 

 

Comments (0)

Can you relate
to any of these
problems?