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:
- Open Settings → Update & Security → Windows Update (on Windows 11 and Server 2025: Settings → Windows Update).
- Click Check for updates, install everything and restart when asked.
- 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:
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10Control when restarts happen
Windows avoids restarting during active hours. Set them to cover the hours your server must stay up:
- Go to Settings → Windows Update → Advanced options → Active hours.
- 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:
Restart-ComputerCheck a restart is pending
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 /scannowin an elevated prompt and try again.
