An always-on RDS host is the worst possible candidate for the default Windows Update behaviour. Servers that run 24/7 never hit “active hours”, so the update engine can start servicing at any hour, reboot on its own schedule, and — with Delivery Optimization on by default in some configurations — decide that the VPS is a good peer to serve patch content from. This guide configures WUfB policy for a production Remote Desktop Session Host: deferral rings, a maintenance window, Delivery Optimization limits, and the pre-flight checks that stop a patch Tuesday from becoming an outage.
Why the Default Settings Break an RDS Host
Three defaults are hostile to a session host. Active hours assume the machine is off overnight; a session host is not. Automatic restarts do not check for active sessions the way administrators assume. And Delivery Optimization treats every Server 2019+ machine as a potential peer, which on a metered link consumes egress and makes the host serve megabytes to other machines on the provider network. These are desktop assumptions applied to server hardware.
WUfB policy lives in the registry under HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate. For a single host a script is easier to review and roll back than a GPO, and the keys are identical either way.
Deferral Rings: Quality vs Feature Updates
Split the two update classes. Quality updates (monthly cumulative patches) should land within days; feature updates on a session host should be deferred for months and tested on a clone first. The policy keys that matter:
$wu = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $wu -Force | Out-Null
# Quality (security/cumulative) updates: defer 3 days
New-ItemProperty $wu -Name 'DeferQualityUpdates' -Value 1 -PropertyType DWord -Force
New-ItemProperty $wu -Name 'DeferQualityUpdatesPeriodInDays' -Value 3 -PropertyType DWord -Force
# Feature updates: defer 120 days, pin the current release
New-ItemProperty $wu -Name 'DeferFeatureUpdates' -Value 1 -PropertyType DWord -Force
New-ItemProperty $wu -Name 'DeferFeatureUpdatesPeriodInDays' -Value 120 -PropertyType DWord -Force
New-ItemProperty $wu -Name 'BranchReadinessLevel' -Value 16 -PropertyType DWord -Force
# Do not auto-restart while anyone is logged on
New-ItemProperty $wu -Name 'NoAutoRebootWithLoggedOnUsers' -Value 1 -PropertyType DWord -Force
Restricting Restarts to a Maintenance Window
A deferral ring controls when patches are downloaded and installed. It does not control when the machine reboots — and on an RDS host, the reboot is the visible outage. Combine an explicit install window, a forced restart window outside business hours, and a scheduled task that drains the host first.
# Install window: Tue 03:00-04:00 ; restart window: Tue 04:00-05:00 (UTC)
$ux = "$wu\UX"
New-Item -Path $ux -Force | Out-Null
New-ItemProperty $ux -Name 'SetAutoRestartDeadline' -Value 1 -PropertyType DWord -Force
New-ItemProperty $ux -Name 'AutoRestartDeadlinePeriodInDays' -Value 2 -PropertyType DWord -Force
Then add the session-aware part no policy key provides: warn every session at 03:30, block new logons at 04:00, restart after a grace period.
Two lines are enough for the drain step: msg * /TIME:1800 with a warning text, then change logon /disable followed by a short wait and Restart-Computer -Force. Put them in a scheduled task that runs only when no interactive administrator is logged on, or you will be rebooting out from under yourself during maintenance.
Delivery Optimization: Stop the Egress Bill and the Peer Role
Delivery Optimization exists so many machines on one LAN can share downloads. On a single VPS the benefit is minimal and the cost is real: peer traffic leaves the box, and on metered plans that is billable egress. Set DO to HTTP-only with a bandwidth ceiling so an update cannot saturate the link that also carries RDP:
$do = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization'
New-Item -Path $do -Force | Out-Null
# 0 = HTTP only, no peer-to-peer
New-ItemProperty $do -Name 'DODownloadMode' -Value 0 -PropertyType DWord -Force
# Cap background download bandwidth; 1% = 10 Mbps of a 1 Gbps link
New-ItemProperty $do -Name 'DOPercentageMaxBackgroundBandwidth' -Value 10 -PropertyType DWord -Force
New-ItemProperty $do -Name 'DOPercentageMaxForegroundBandwidth' -Value 30 -PropertyType DWord -Force
New-ItemProperty $do -Name 'DOMaxCacheAge' -Value 259200 -PropertyType DWord -Force
Disk Space: The Failure Mode Nobody Plans For
- Cleanup after updates: DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase monthly — reclaims superseded components but makes installed updates non-removable.
- Cleanup before updates: clear C:\Windows\SoftwareDistribution\Download after stopping wuauserv, not while it is running.
- Watch the alert: a PerfMon/disk alert at 12% free space gives you days of warning.
Pre-Flight Checklist the Night Before Patch Tuesday
- Free space on C: Get-Volume C — pass if above 20% used.
- Pending reboot already? Test-Path ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired’ — pass if False.
- Snapshot exists: a provider or Hyper-V snapshot younger than 24 hours.
- Sessions at 04:00: qwinsta or Get-RDUserSession — every user known and notified.
- Backup verified: last successful backup job under 24 hours old.
If any item fails, delay the ring by a week. Plenty of hosts reboot on schedule; few are patched and stable on the same night. The Windows VPS hosting plans and specifications page lists disk sizes that leave room for update staging without squeezing the database files.
Verifying the Policy Actually Applied
Registry values can be overridden by an existing GPO or the update client’s own state. Reboot once and verify through the update API rather than trusting regedit:
# Effective policy as seen by the update client
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired' -ErrorAction SilentlyContinue
# When the next scan and install are scheduled
Get-ScheduledTask -TaskPath '\Microsoft\Windows\WindowsUpdate\*' |
Get-ScheduledTaskInfo | Format-Table TaskName,NextRunTime,LastRunTime
# Recent update events
Get-WinEvent -LogName 'Microsoft-Windows-WindowsUpdateClient/Operational' -MaxEvents 30 |
Select-Object TimeCreated,Id,Message
If the next run times in that folder do not match your intended window, a policy is being overridden — find the GPO before changing anything else. The restart deadline is the one setting that will bite you: if it is set to 0, the host can reboot as soon as installation finishes, window or no window. You can cross-check the scheduled-task and WUfB policy paths against the Windows Server administration guides we keep alongside the hosting comparison.



