Learn › Windows Server

Patching Windows Server Safely: Plan, Install, Verify

A safe Windows Server patching routine: how monthly updates work, pre-checks, installing via Windows Update, WSUS or PowerShell, reboots and checks.

Intermediate 11 min read
By Gopinath Karthikeyan

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.
Monthly Windows Server patching cycle Updatesreleased Patch Tuesday Updatesவெளியீடு Patch Tuesday 1 Test Lab and pilot servers Test Lab, pilot servers 2 Pre-checks Backup, disk, services Pre-checks Backup, disk, services 3 Install in waves Low risk first Waves-ஆகinstall குறைந்தrisk முதலில் 4 Reboot & verify Services, apps, logs Reboot & verify Services, apps, logs 5 Report Fix failures, record Report Failures சரிசெய் 6 Everymonth ஒவ்வொருமாதமும்
A repeatable monthly routine: test new updates, run pre-checks, install in waves, verify after the reboot and report – then start again next month.ஒவ்வொரு மாதமும்: updates-ஐ test செய், pre-checks, waves-ஆக install, reboot-க்கு பின் verify, report – அடுத்த மாதம் மீண்டும்.

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

  1. Check the System and Application event logs for errors after the reboot.
  2. Start any stopped services and read their errors.
  3. 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 questions

PatchingWindows UpdateWSUSWindows ServerChange Management

Gopinath Karthikeyan

Gopinath Karthikeyan – Windows Site Reliability Engineer with about 12 years in enterprise Windows Server infrastructure, and founder of WinOps Academy. YouTube · LinkedIn

More in Windows Server