Generate Windows Update PowerShell commands for local or remote PCs. Scan, install, hide, uninstall, pause, or reboot using PSWindowsUpdate or usoclient.
Windows Update has accumulated three generations of command-line interfaces, and which one works depends on the Windows version in front of you. wuauclt was the answer on Windows 7 and Server 2012 and is mostly inert on Windows 10 and 11. usoclient replaced it, runs silently, and is barely documented. The PSWindowsUpdate PowerShell module is the only option that gives real output and manages remote machines properly — and it is not installed by default. This generator picks a working command for the action you want, on the platform you have, for local or remote targets, and chains several actions into one copy-paste script.
It generates text only. Nothing runs, no machine is contacted, and no credentials are involved. You copy the script, read it, and run it yourself in an elevated PowerShell window.
Invoke-Command or Invoke-WUJob wrapper and lists the machines as a PowerShell array.Nine of the ten actions require an elevated PowerShell session — only viewing update history runs as a standard user. The generated script says so in its header when any step needs it, but it is worth being explicit about which commands change state and which can take a machine offline.
| Action | Needs admin | Operational impact |
|---|---|---|
| Check for updates | Yes | Read-only scan. Safe at any time. |
| View history | No | Read-only query of installed hotfixes. |
| Download | Yes | Consumes bandwidth and disk. No restart. |
| Install | Yes | May restart the machine. With -AutoReboot it definitely will. |
| Cancel a running update | Yes | Stops update services and cancels transfers. An update already installing will still finish on next boot. |
| Hide a KB | Yes | Configuration change; suppresses an update indefinitely until unhidden. |
| Uninstall a KB | Yes | Removes a patch, usually reopening whatever it fixed. Often requires a restart. |
| Pause / resume | Yes | Writes or removes a registry policy value. No restart. |
| Reboot to finish | Yes | Restarts immediately, with no user warning and no grace period. |
Two of these deserve a hard pause before you press enter. The reboot action emits Restart-Computer -Force, which restarts the machine immediately — anyone logged in loses unsaved work, and against a remote list it restarts every machine in that list at once. The generator prefixes those commands with an explicit warning comment for exactly that reason, and offers the -Wait -For PowerShell -Timeout 600 variant so a script can wait for each machine to come back before continuing. The uninstall action removes a security patch; if you are backing out a bad update, make sure you know what vulnerability the machine is exposed to again in the meantime, and plan to reinstall or replace it.
| Method | Works on | Notes |
|---|---|---|
PSWindowsUpdate module | Any Windows with PowerShell | Most control and visible output; the only method that manages remote computers natively. Requires Install-Module PSWindowsUpdate -Force first. |
usoclient | Windows 10/11, Server 2016+ | Built-in and modern, but runs silently with no output — check Settings > Windows Update to see what happened. |
wuauclt | Windows 7 / Server 2012 | Legacy. Largely non-functional on Windows 10 and 11; the generator labels it as such rather than pretending otherwise. |
| Built-in PowerShell | Any Windows | Get-HotFix, wusa, Restart-Computer. No module install needed. |
wmic | Any Windows (deprecated in Win 11) | Quick read-only listing of installed updates. |
| Registry | Windows 10/11 | Writes Windows Update policy values directly. Used for pause and resume. |
Install a specific patch locally without restarting. Choosing install, the PSWindowsUpdate method, KB5001234, and leaving auto-reboot off produces:
Install-WindowsUpdate -KBArticleID KB5001234 -AcceptAll -IgnoreReboot
-IgnoreReboot is what keeps the machine up; switch auto-reboot on and it becomes -AutoReboot, which restarts as soon as the install requires it.
Check what is available on three servers. Selecting remote targets wraps the scan in a job against a PowerShell array:
Get-WindowsUpdate -ComputerName @('SRV01','SRV02','SRV03')
Stop an update that is mid-flight. The cancel action produces a sequence rather than a single command: stop wuauserv, usosvc, and bits, remove every in-progress BITS transfer, then start the services again so future updates still work. The generated comments state the limitation plainly — an update already past the installing stage will complete on the next reboot regardless, and has to be uninstalled afterwards.
Pause updates for a change freeze. The pause action writes an expiry timestamp to HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings at a date you choose; resume removes that value and triggers a fresh scan.
Remote actions need PowerShell remoting enabled on each target, which means running Enable-PSRemoting -Force on the machine itself — a step you cannot bootstrap remotely with these commands. The generated script includes that reminder in its header whenever any step targets a remote computer.
The other constraint is specific to Windows Update: it will not install updates through a normal remote session, because the update agent refuses to run under a network logon token. That is why the PSWindowsUpdate method uses Invoke-WUJob, which registers a scheduled task on the target running as SYSTEM, rather than plain Invoke-Command. If a remote install appears to do nothing, this double-hop restriction is almost always the reason.
No. It assembles script text in your browser. Nothing executes, no host is contacted, and no credentials are collected. You copy the script and run it yourself, which gives you the chance to review it first.
wuauclt /detectnow do nothing on Windows 11?Because Microsoft replaced the Windows Update Agent’s command surface with the Update Session Orchestrator. On Windows 10 and 11 the old switches are accepted and ignored. Use usoclient or the PSWindowsUpdate module instead; the generator marks wuauclt as legacy for this reason.
Probably not. usoclient returns immediately and does its work in the background with no console output. Open Settings > Windows Update to see the scan, download, or install progress.
Run Install-Module PSWindowsUpdate -Force from an elevated PowerShell session. It comes from the PowerShell Gallery, so the machine needs outbound access to it, and you may be prompted to trust the repository the first time.
Invoke-Command?Not reliably. The Windows Update agent blocks installs initiated over a remote session token. Invoke-WUJob works around this by scheduling a task that runs locally as SYSTEM, which is what the generator emits for remote installs.
Hiding prevents an update from being offered or installed in the first place — useful when a known-bad patch is pending. Uninstalling removes one that is already applied, which reintroduces whatever it fixed and often requires a restart. Hide before it lands, uninstall only when it already has.
No. Both Restart-Computer -Force and usoclient RestartDevice restart immediately with no countdown and no prompt. Unsaved work is lost. Schedule it, or use the -Wait variant in a controlled maintenance window.
Windows caps consumer pause at 35 days from the current date. Setting a longer expiry in the registry does not extend it — the setting is clamped. For longer or policy-driven deferrals, use Windows Update for Business policies or your patch management platform.
The Exchange Online PowerShell command builder covers mailbox-side administration in the same style, and the MTBF/MTTR calculator helps quantify how much a reboot window actually costs in availability terms.
Windows Update PowerShell commands enable system administrators to manage Windows updates programmatically — querying available updates, installing patches, scheduling maintenance windows, and generating compliance reports across fleets of machines. While Windows Update settings can be configured through the GUI or Group Policy, PowerShell provides the automation capabilities needed for enterprise-scale patch management.
This tool generates PowerShell commands and scripts for common Windows Update operations, using the PSWindowsUpdate module and built-in Windows Update cmdlets.
| Module | Source | Use Case |
|---|---|---|
| PSWindowsUpdate | PowerShell Gallery | Full-featured WU management (install, download, hide, report) |
| WindowsUpdateProvider | Built-in (Server) | Basic update scanning and installation on Windows Server |
| WSUS cmdlets | RSAT feature | Managing Windows Server Update Services infrastructure |
| Intune Graph API | Microsoft Graph | Cloud-managed device update compliance via PowerShell |
| Command | Purpose |
|---|---|
| Get-WindowsUpdate | List available updates |
| Install-WindowsUpdate | Download and install updates |
| Get-WUHistory | View update installation history |
| Hide-WindowsUpdate | Suppress specific updates |
| Get-WUServiceManager | List configured update sources |
| Remove-WindowsUpdate | Uninstall specific updates |
PSWindowsUpdate is a PowerShell module that provides comprehensive Windows Update management. Install it with: Install-Module -Name PSWindowsUpdate -Force. It supports checking for updates, installing specific KBs, managing WSUS, and scheduling reboots.
usoclient is the modern Update Session Orchestrator client introduced in Windows 10, while wuauclt is the legacy Windows Update AutoUpdate Client. Use usoclient for Windows 10/11 and wuauclt for older systems. usoclient commands include StartScan, StartDownload, and StartInstall.
Use Get-WUHistory from PSWindowsUpdate module, or query WMI with Get-WmiObject -Class Win32_QuickFixEngineering. You can also use Get-HotFix for installed hotfixes and systeminfo with findstr KB for a quick list of installed KBs.
Yes, use Remove-WindowsUpdate -KBArticleID KB5001234 from PSWindowsUpdate, or wusa.exe /uninstall /kb:5001234 /quiet. You can also use DISM: dism /online /remove-package /packagename:Package_for_KB5001234. Always create a restore point first.
Use the Remote Computer(s) target in the Command Builder, or the Remote Computers presets. Enter the computer name or IP address and the tool generates the right command. For installs, the tool uses Invoke-WUJob from the PSWindowsUpdate module because Windows blocks direct remote update installs. Requirements: WinRM enabled on the target (Enable-PSRemoting -Force), administrator rights, and the PSWindowsUpdate module installed on the target machine.