Patching is the most repeated job in Windows operations, and one of the riskiest. Done well, nobody notices. Done badly, it causes outages or leaves known security holes open. This guide gives you a routine that works for a handful of servers or a few thousand.
How Windows updates arrive
- Microsoft releases security updates on the second Tuesday of each month (“Patch Tuesday”).
- Updates are cumulative: the latest monthly update includes all earlier fixes for that Windows version. You don’t install months one by one.
- Servers get updates from Windows Update directly, from WSUS (your own approval server), or from a management tool like Configuration Manager or Azure Update Manager.
Before you patch: pre-checks
Run these on each server (or across many with remoting – see the PowerShell track):
# Free space on C: (updates need several GB)
Get-PSDrive C | Select-Object @{n='FreeGB';e={[math]::Round($_.Free/1GB,1)}}
# Last installed updates
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 3 HotFixID, InstalledOn
# Is a reboot already pending? (a pending reboot can make new updates fail)
$keys = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending',
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired'
$keys | ForEach-Object { if (Test-Path $_) { "Reboot pending: $_" } }
# Services that are set to Automatic and currently running – save this for comparison after
Get-CimInstance Win32_Service -Filter "StartMode='Auto' AND State='Running'" |
Select-Object -ExpandProperty Name | Set-Content C:\Temp\services-before.txt
Also confirm:
- A recent backup or snapshot exists (and you know how to restore it).
- The application owner knows the window and who confirms the app works afterwards.
- Clusters and load-balanced pairs are patched one node at a time.
Installing
GUI: Settings → Windows Update → Check for updates → Install → Restart.
PowerShell: Windows has no built-in cmdlet for installing updates, so many admins use PSWindowsUpdate, a popular community module from the PowerShell Gallery (check your company allows it first):
Install-Module PSWindowsUpdate -Scope CurrentUser
Get-WindowsUpdate # list available updates
Install-WindowsUpdate -AcceptAll -IgnoreReboot
At scale, use your management tool or an automation pipeline (see Ansible: Windows patching with rolling updates in the Ansible track) rather than logging in to each server.
Reboots
- Most monthly updates need a restart to finish.
- Restart in a controlled order: application servers before or after their databases, per your app owner’s runbook.
- After restart, wait until the server reports no pending reboot – some updates need a second restart.
After patching: verify
# Did the new update install?
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 3 HotFixID, InstalledOn
# Uptime – did the restart happen?
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
# Compare automatic services with the 'before' list
$before = Get-Content C:\Temp\services-before.txt
$now = Get-CimInstance Win32_Service -Filter "StartMode='Auto' AND State='Running'" |
Select-Object -ExpandProperty Name
Compare-Object $before $now | Where-Object SideIndicator -eq '<=' # were running, now aren't
Finally, the application owner checks the app. Close the change only when they confirm.
If something breaks
- Check the System and Application event logs for errors after the reboot.
- Start any stopped services and read their errors.
- If the update itself is the cause, uninstall it (
wusa /uninstall /kb:<number>) or roll back to the snapshot – and report it, because other servers will hit the same problem.
FAQ
Can I skip a month? You can, but the next cumulative update then carries two months of changes and risk, and the server stays exposed meanwhile.
Should I keep VM snapshots after patching? Only for a day or two. Old snapshots slow VMs down and fill datastores.
What’s next
Next: Log off disconnected RDP sessions with PowerShell, then performance troubleshooting.
Practise this topic
Test yourself with free questions on this topic – instant answers and explanations.
Start practice questionsPatchingWindows UpdateWSUSWindows ServerChange Management