Security

Windows Update on a VPS: patches and maintenance windows

Install Windows updates, set active hours, plan a weekly maintenance window and make sure your programs come back after a restart.

BeginnerWindows server2 min read

Windows updates close security holes that attackers actively use, so a server that is never patched becomes an easy target. On a VPS the main question is not whether to update, but when the restart happens.

Check for updates now

Windows Server 2019, 2022, 2025 and Windows 10/11 with a desktop:

  1. Open Settings → Update & Security → Windows Update (on Windows 11 and Server 2025: Settings → Windows Update).
  2. Click Check for updates, install everything and restart when asked.
  3. Check again after the restart. Large updates sometimes arrive in two rounds.

Server Core (no desktop): run sconfig and choose the option to install updates.

See what was installed recently:

PowerShell
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

Control when restarts happen

Windows avoids restarting during active hours. Set them to cover the hours your server must stay up:

  1. Go to Settings → Windows Update → Advanced options → Active hours.
  2. Choose Manually and set the start and end times.

Tip: Pick a weekly maintenance window, for example Sunday morning, when you install updates and restart by hand. Doing it yourself is better than an automatic restart at a moment you did not choose.

Before you restart

  • Save your work and close programs cleanly, especially databases and trading terminals.
  • Make sure programs that must run all the time start again on their own after a restart. For MetaTrader see Auto-start MetaTrader after a reboot; for scripts and services see Schedule tasks with Task Scheduler.
  • If your plan includes snapshots, take one in the control panel before a major upgrade.

Restart from PowerShell when you are ready:

PowerShell
Restart-Computer

Check a restart is pending

PowerShell
Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"

True means updates are waiting for a restart.

Troubleshooting

  • Updates stuck at a percentage: give it time; some cumulative updates take 30 minutes or more on first install. If the server is unreachable over RDP, watch progress in the browser console from the control panel.
  • An update fails repeatedly: note the error code shown in Windows Update and search for it on Microsoft's support site, or run sfc /scannow in an elevated prompt and try again.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.