Cumulative Update auf SharePoint anwenden, dauert immer ein Weilchen. Teilweise sogar Stunden. Gerade für SharePoint 2013 habe ich hier einen heißen Tipp, um den Vorgang etwas zu beschleunigen.
Grundsätzlich
Besteht die SharePoint Farm aus nur einem Server oder aus mehreren Server, wobei die Rollen nicht redundant sind, kommt es während der Aktualisierung zu Ausfällen. Für eine Mehrserverfarm inkl. Load Balancer empfiehlt es sich den zu patchenden Server vorher aus dem NLB zu nehmen.
Mit SharePoint 2013 gibt es das Minimal Downtime Patching, mit SharePoint 2016 gibt es das sog. Zero Downtime Patching. Allerdings ändert das am Vorgehen nichts, sondern einfach die Art und Weise wie am Ende die Datenbank aktualisiert wird und daher ohne Ausfallzeiten vonstatten gehen kann.
Vorgang selbst
- Binaries installieren (Zuerst WFE)
- SharePoint Products and Configuration Wizard ausführen (Zuerst Central Admin)
- -auf jedem Server-
Vorbereitung
Natürlich mal als erstes die Installationsquellen herunterladen für das jeweilige CU – bei SP2013 sind das durchaus mal 3,3 GB (immer alle Dateien herunterladen). Bei SP2016 ist es nur rund 430 MB.
Skript als Unterstützung, das stoppt u.a. den Timer Job, das allein kann schon Stunden sparen. Ein automatisiertes Skript, was noch mehr macht, kann man hier finden: https://github.com/Hobmaier/Scripts/blob/master/Install-Patch.ps1 bzw. hier als Text:
# V 1.2 Dennis Hobmaier # 1.1: Add SP Module # 1.2: Now compatible with SharePoint 2016 add-pssnapin microsoft.sharepoint.powershell -ea silentlycontinue <# ============================================================== // // 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 $SPVersion = (get-spfarm).buildversion.major $srv4 = get-service "OSearch$SPVersion" $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 "OSearch$SPVersion" -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 foreach ($patch in $patchfile) { $filename = $patch.basename Start-Process $filename 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 "OSearch$SPVersion" $srv5 = get-service "SPSearchHostController" ###Ensuring Search Services were stopped by script before Starting" if($srch4srvctr -eq 2) { set-service -Name "OSearch$SPVersion" -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"
Setup starten
Anschließend am Besten per Skript das Setup starten.

Das Skript starten, es führt einfach die .exe Datei aus (ohne Parameter, d.h. man kann ganz normal klicken), nur dass eben auch Search pausiert, IIS und SPTimerv4 gestoppt werden.
Während der Aktualisierung sieht es dann so aus:

Damit werden grundsätzlich mal die Binaries auf dem SharePoint Server installiert. Nach Abschluss kommt womöglich noch die Aufforderung nach einem Neustart, an dieser Stelle bitte verneinen, damit das Skript wieder alle Dienste korrekt starten kann. Erst danach den Server neu starten.
Anschließend sollte noch psconfig.exe oder der SharePoint Products and Configuration Wizard (psconfigui.exe) ausgeführt werden, damit sowohl Datenbanken aktualisiert werden, als auch die Binaries aktiv werden. Sollte man sich für psconfig.exe entscheiden, dann bitte mit folgendem Kommando, damit auch wirklich alles installiert wird:
PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install
Am Ende sollte das so Aussehen:

Kontrolle
Bitte in der Central Admin nachsehen, hier kann man auch oft schon erkennen, ob das letzte Update tatsächlich abgeschlossen ist und die Farm sauber gepatcht ist. Ich habe es schon öfter gesehen, dass hier Failed steht, und es dann entsprechende Seiteneffekte gibt, da das Update ja nur halb installiert ist:
Central Admin – Upgrade and Migration – Check upgrade status (http://<CA URL>/_admin/UpgradeStatus.aspx)

AppFabric
Bitte auch daran denken, AppFabric zu aktualisieren! AppFabric ist die Grundlage für den Distributed Cache und daher wichtig für:
- Authentifizierung (ganz besonders in Verbindung mit Provider Hosted Apps)
- Newsfeed
- Cache
Dieser sollte min. auf CU4 gepatcht sein (Standard nach Installation ist CU1). Aktuell ist CU7, die gibt’s hier zum Download: https://support.microsoft.com/en-us/help/3092423/cumulative-update-7-for-microsoft-appfabric-1-1-for-windows-server
Diese Version kann man über die Systemsteuerung – Programm – View installed updates einsehen:

Hey Dennis,
danke für die Infos! Hätte ich den Artikel doch vorher gelesen … bei uns hat alles mit drum und dran glaube ich mehr als 5h gedauert. Mit Sicherheit war es der Timer Job, aber nachdem ich den Artikel gelesen habe, sehe ich noch mehr Verbesserungspotenziale (beim nächsten Mal).
Danke nochmals für die Info, auch wenn ich bereits ‚gelitten‘ habe 😛
Viele Grüße
Tobias
Hallo Tobias,
Danke für dein Feedback!
Schöne Grüße
Dennis
Ciao Dennis,
cooles Script und danke für die Erklärungen. Eine kleine Frage habe ich jedoch noch.
Für SharePoint 2013 kann man jeweils zwei Exe files herunterladen. Für das CU Mai 2018 sind das bspw.
ubersrv2013-kb4018397-fullfile-x64-glb
ubersts2013-kb4018394-fullfile-x64-glb
Zusätzlich zu den beiden cab-Files
ubersrv_1
ubersrv_2
Sind da beide EXE Files notwendig?
Danke dir für eine kurze Rückmeldung.
Grüsse aus der Schweiz
Abi
Hallo Abi,
in diesem Fall benötigst du nur die ubersrv2013-kb4018397-fullfile-x64-glb + die cab Dateien. Die andere EXE ist nur für Foundation und in der EXE+CAB bereits enthalten.
Schöne Grüße
Dennis