Patching

Windows Update Commands: Force Updates via USOClient (2026)

Force Windows updates via CLI with USOClient and PowerShell. Master scaninstallwait, startscan, and more in our 2026 guide for Windows 10, 11, and Server.

By InventiveHQ Team

Need to request a Windows update from the command line? This guide covers common USOClient, WUAUCLT, PowerShell, and WSUS commands for Windows 10, 11, and Server โ€” client-side and server-side. Use the generator below to draft a command for your scenario, then check its behavior against your build and update policy.

Windows Update PowershellRuns in your browser โ€” nothing is uploaded.

Wondering whether USOClient.exe is safe? If you spotted this process in Task Manager and want to know if it's legitimate or malware, see our dedicated guide: Is USOClient.exe Safe? Windows Update Process Explained. This article focuses on the commands.


Quick Reference: Essential Commands

Need to run Windows updates right now? Here are the most common commands:

# USOClient, where available; behavior depends on build and policy
usoclient startscan              # Request a scan; verify the result
usoclient startdownload          # Request download; verify on this build and policy
usoclient startinstall           # Request installation; verify on this build and policy
usoclient scaninstallwait        # Build-dependent; verify the result

# PowerShell (supported build with module)
Install-Module PSWindowsUpdate   # Install module if supported
Get-WindowsUpdate -MicrosoftUpdate      # List available updates
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll  # Install offered updates

Which tool do you need?

  • Windows 10/11 or Windows Server โ†’ USOClient (check availability and behavior on the target build)
  • Windows 7 / Server 2012 R2 (legacy) โ†’ WUAUCLT
  • Automation and remote updates โ†’ PowerShell + PSWindowsUpdate

Jump to the section you need below, or use the generator at the top to build the command for you.


USOClient: Modern Update Management

Windows includes Update Session Orchestrator components, and usoclient.exe can request update actions on some Windows builds. Its switches are not a documented automation interface; check availability, policy, and results on each target build before relying on them.

Windows 10Windows 11Windows Serverโš  Verify on the target build

USOClient Command Reference

CommandDescription
startscanRequest a scan for available updates; verify the result
startdownloadRequest download; confirm behavior on the target build and policy
startinstallRequest installation; confirm behavior on the target build and policy
refreshsettingsRequest a settings refresh; verify the result
startinteractivescanRequest an interactive scan; behavior can vary
restartdeviceRequest a restart; check reboot state before using
scaninstallwaitUndocumented combined request; behavior varies by build

USOClient Usage Examples

# Scan for available updates
usoclient startscan

# Request download of detected updates; verify the result
usoclient startdownload

# Request installation of downloaded updates; verify the result
usoclient startinstall

# Combined request on some builds; verify installation separately
usoclient scaninstallwait

Updating PowerShell Itself vs. Using PowerShell to Update Windows

People searching for "how to update Windows PowerShell" mean one of two different things, and they need different commands:

  • Use PowerShell to update Windows โ€” install OS patches from a PowerShell prompt. That's the PowerShell automation section below (the PSWindowsUpdate module).
  • Update PowerShell itself โ€” upgrade the app from Windows PowerShell 5.1 to PowerShell 7.

To update PowerShell itself, use winget on Windows 10/11:

# Check your current version
$PSVersionTable.PSVersion

# Install or upgrade to the latest PowerShell 7.x
winget install --id Microsoft.PowerShell --source winget

# Upgrade an existing install
winget upgrade --id Microsoft.PowerShell

If winget isn't available (Server Core or older builds), install the MSI silently:

msiexec.exe /package PowerShell-7.x.x-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU=1 ENABLE_PSREMOTING=1

Note: PowerShell 7 installs side-by-side as pwsh.exe โ€” it does not replace Windows PowerShell 5.1 (powershell.exe). PSWindowsUpdate is published as a Desktop-edition module; verify compatibility and run its examples in Windows PowerShell 5.1 unless your installed module supports the host you use.


PowerShell: Advanced Update Automation

PowerShell is the most flexible option. The community PSWindowsUpdate module adds query, install, and reporting commands. Check the installed module's help for available parameters and test against your Windows build and update-source policy. Not sure which cmdlet flags you need? The generator above builds ready-to-run commands for you.

Check module and Windows compatibilityLocal & remoteRequires PSWindowsUpdate module

The examples below target recent PSWindowsUpdate releases. Older releases used names such as Get-WUList and Get-WUInstall; check Get-Command -Module PSWindowsUpdate and Get-Help <command> -Full on each machine. -MicrosoftUpdate selects Microsoft Update where permitted; on managed devices, first verify source policy and approvals. Installation requests and remote jobs require checking update history and reboot state before treating them as complete.

Installing PSWindowsUpdate Module

# Install from PowerShell Gallery (PowerShell 5+)
Install-Module PSWindowsUpdate

# Import the module
Import-Module PSWindowsUpdate

# Register Microsoft Update only if organizational policy permits it
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d

Essential PowerShell Update Commands

# List available updates
Get-WindowsUpdate -MicrosoftUpdate

# Install all updates with automatic reboot
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot

# Install updates without automatic reboot (recommended)
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll

# Check if reboot is required
Get-WURebootStatus

# View update history
Get-WUHistory

Advanced PowerShell Filtering

# Install only security updates
Install-WindowsUpdate -MicrosoftUpdate -Category "Security Updates" -AcceptAll

# Exclude specific updates by title
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -NotTitle "Silverlight"

# Install updates in the Critical Updates classification, if offered
Install-WindowsUpdate -MicrosoftUpdate -Category "Critical Updates" -AcceptAll

Remote Computer Management

Remote PSWindowsUpdate commands depend on the module release, target-side setup, remoting permissions, and policy. Verify each target's result after dispatch; Invoke-WUJob schedules work and does not itself confirm installation.

# Install updates on remote computer
Install-WindowsUpdate -ComputerName SERVER01 -MicrosoftUpdate -AcceptAll

# Install updates on multiple computers
Install-WindowsUpdate -ComputerName SERVER01,SERVER02,SERVER03 -MicrosoftUpdate -AcceptAll

# Use credentials for remote job dispatch if supported by the installed module
$cred = Get-Credential
Invoke-WUJob -ComputerName SERVER01 -Script {Import-Module PSWindowsUpdate; Install-WindowsUpdate -AcceptAll} -Credential $cred

# Check update status on remote computers
Get-WindowsUpdate -ComputerName SERVER01,SERVER02 -MicrosoftUpdate

Specific Update Management

Install, hide, or remove specific updates by KB article number for precise control over your update environment.

# Install a specific offered KB update; replace the placeholder
Install-WindowsUpdate -KBArticleID "KB<article-id>" -AcceptAll

# Install multiple offered KB updates; replace the placeholders
Install-WindowsUpdate -KBArticleID "KB<first-id>","KB<second-id>" -AcceptAll

# Inspect available hide and show operations in the installed module
Get-Help Get-WindowsUpdate -Full

# Inspect hidden updates
Get-WindowsUpdate -IsHidden

# Review the installed module's uninstall parameters before removal
Get-Help Remove-WindowsUpdate -Full

# Uninstall only after confirming that the specific update supports removal
Remove-WindowsUpdate -KBArticleID "KB<article-id>" -NoRestart

Scheduled Automation

For unattended tasks, choose a principal with the required update permissions and a logon method that works without an interactive session; see Microsoft's scheduled-task principal documentation. Test the script under that identity, then inspect the task's last run result, update history, and pending reboot state. The module's scheduling and reboot parameters should be checked with Get-Help on the installed version.

# Inspect scheduling and reboot parameters on the installed module
Get-Help Install-WindowsUpdate -Full

Email Reporting and Notifications

Configure email notifications to stay informed about update installation status and results.

# Send email report after update installation
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -SendReport -PSWUSettings @{
    SmtpServer="smtp.company.com"
    Port=587
    To="admin@company.com"
    From="updates@company.com"
}

# Configure email settings for future use
$EmailParams = @{
    SmtpServer = "smtp.office365.com"
    Port = 587
    To = "it-team@company.com"
    From = "windowsupdates@company.com"
    Subject = "Windows Update Report - {0}" -f $env:COMPUTERNAME
}
Set-PSWUSettings @EmailParams

# Send history report
Get-WUHistory -Last 30 -SendReport

# Email report with specific format
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -SendHistory -SendReport

Cancel or Stop a Running Update

There is no reliable usoclient cancel switch. To prevent a pending restart, use the Windows Update settings to pause future updates or schedule a restart. Stopping services can interrupt transfers but does not reliably cancel an installation already in progress. Avoid removing all users' BITS transfers: they may belong to other applications. If an installed update must be removed, first confirm the specific KB and whether it supports uninstallation, then use the specific update management steps.

Cancel a Running Update on Remote Computers

On remote computers, inspect each machine's update state and use your management policy to defer future deployments. Do not cancel unrelated BITS jobs or interrupt an active installation across a fleet.

Pause Updates So They Don't Restart

Use the supported pause control in Settings > Windows Update, or set an organization policy through Group Policy or Intune. The available pause period and behavior depend on the Windows edition and policy. A single registry value does not reliably pause updates or resume them.

Tip: The command builder at the top of this page also offers cancel, pause, and resume recipes. Review those against the supported controls on your Windows build before running them.


WUAUCLT: Legacy Windows Update Management

The Windows Update Automatic Update Client (WUAUCLT) provides legacy update requests on older systems such as Windows 7 and Server 2012 R2. Its switches are unreliable as general automation interfaces on newer Windows releases; verify each request against the client's update history and WSUS status.

Windows 7Server 2012 R2โš  Deprecated on Windows 10/11 & Server 2016+

Warning: Do not assume WUAUCLT switches perform the same actions on Windows 10/11 or newer Server releases. Check the effective update source and use supported management methods for your environment.

Essential WUAUCLT Commands

CommandDescription
/DetectNowRequest update detection on supported legacy clients; download is separate
/ReportNowRequest status reporting to WSUS on supported legacy clients
/ResetAuthorizationReset the WSUS authorization cookie on supported legacy clients; normally pair with /DetectNow when troubleshooting registration
/UpdateNowLegacy install request; availability and effect vary by client version
/ShowSettingsDialogLegacy settings request; availability varies by client version

Common WUAUCLT Examples

# Request detection and installation on a legacy client; verify the outcome
wuauclt /detectnow /updatenow

# Reset authorization only when troubleshooting WSUS registration
wuauclt /resetauthorization /detectnow

# Report client status to WSUS server
wuauclt /reportnow

WSUS Integration and Enterprise Management

Windows Server Update Services (WSUS) provides centralized update management for enterprise environments. Understanding WSUS client commands is essential for troubleshooting and maintaining proper update deployment.

WSUS Client Configuration

Verify and configure WSUS server settings using registry keys and PowerShell commands.

# Check configured WSUS server
Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name WUServer

# Check WSUS status server
Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name WUStatusServer

# View all WSUS-related registry settings
Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"

# Request status reporting on a supported legacy WSUS client
wuauclt /reportnow

# Request a registration refresh on a supported legacy WSUS client
wuauclt /resetauthorization /detectnow

WSUS Client Registration Issues

If clients appear twice or do not report, check the effective WSUS policy, update service health, and Windows Update logs first. Duplicate SusClientId values can occur in cloned images, but deleting registration values across a fleet can make diagnosis harder. Confirm the duplicate IDs and follow a documented re-registration procedure for the affected Windows build before changing them.

WSUS with PowerShell

On WSUS-managed clients, PSWindowsUpdate can query and request installation from the effective update source. Confirm the source and the installed module's behavior before deployment.

# On a WSUS-managed client, inspect the updates available from its configured source
Get-WindowsUpdate

# Install approved updates from the configured source
Install-WindowsUpdate -AcceptAll

The effective update source comes from Windows Update policy. Changing it requires updating the governing policy, including UseWUServer, rather than adding or removing a hard-coded service ID.

Pro Tip: Understanding WSUS vs Microsoft Update - WSUS allows organizations to approve and control which updates are deployed. WSUS approvals govern updates offered through that source, but effective scan and download sources can also depend on Windows Update policy. /ReportNow requests reporting on supported legacy clients; verify the resulting status in WSUS rather than assuming immediate check-in.


WSUS Commands: Server-Side Administration

The preceding client commands run on the client. If you administer the WSUS server itself, you have two command-line toolsets: WSUSUtil.exe (the built-in maintenance utility) and the UpdateServices PowerShell module (installed with the WSUS role or RSAT). These are what you use to approve updates, run cleanup, and keep the server healthy.

Advertisement

WSUSUtil.exe Command Reference

wsusutil.exe lives in C:\Program Files\Update Services\Tools\. Run it from an elevated prompt on the WSUS server itself.

The inactive-approval and revision commands below have specific meanings in Microsoft's WSUSUtil command reference. For deleteunneededrevisions, Microsoft instructs administrators to stop the IIS website hosting WSUS before running the command and restart it after the command finishes. Follow the procedure for your WSUS release before database cleanup.

CommandDescription
wsusutil.exe checkhealthCheck WSUS server health (results log to Event Viewer)
wsusutil.exe resetRe-verify update files and re-download missing or corrupt content
wsusutil.exe listinactiveapprovalsList approvals made permanently inactive by a change in WSUS server language settings
wsusutil.exe removeinactiveapprovalsRemove approvals made permanently inactive by a change in WSUS server language settings
wsusutil.exe deleteunneededrevisionsPurge metadata for unnecessary update revisions; stop the WSUS IIS website first and restart it afterward
wsusutil.exe export package.cab export.logExport metadata for an air-gapped / disconnected WSUS
wsusutil.exe import package.cab import.logImport that metadata on the disconnected server
wsusutil.exe movecontent D:\WSUS\ move.logMove the update content folder to another drive
wsusutil.exe usecustomwebsite trueSwitch the WSUS HTTP website to port 8530; HTTPS on 8531 requires separate IIS/SSL configuration and wsusutil configuressl (Microsoft's WSUS configuration guide)
# Check server health
& "C:\Program Files\Update Services\Tools\wsusutil.exe" checkhealth

# Reset and re-download any missing or corrupt update files
& "C:\Program Files\Update Services\Tools\wsusutil.exe" reset

WSUS PowerShell (UpdateServices Module)

The UpdateServices module ships with the WSUS role and RSAT. It's the modern way to script approvals, cleanup, and reporting on the server.

# Connect to the local WSUS server
$wsus = Get-WsusServer

# Connect to a remote WSUS server (port 8530 = HTTP, 8531 = HTTPS)
$wsus = Get-WsusServer -Name WSUS01 -PortNumber 8530

Query and Approve Updates

# List updates that are needed but not yet approved
Get-WsusUpdate -Approval Unapproved -Status FailedOrNeeded

# Approve all critical updates for the "All Computers" group
Get-WsusUpdate -Classification Critical -Approval Unapproved |
    Approve-WsusUpdate -Action Install -TargetGroupName "All Computers"

# Review superseded updates before declining; check approvals and replacements
Get-WsusUpdate -Classification All -Approval AnyExceptDeclined |
    Where-Object { $_.Update.IsSuperseded } |
    Select-Object Title, KnowledgebaseArticles, Update

Manage Clients and Groups

# List computers reporting to WSUS
Get-WsusServer | Get-WsusComputer |
    Select-Object FullDomainName, LastReportedStatusTime, LastSyncTime

# Find clients that haven't checked in for 30+ days
Get-WsusComputer | Where-Object {
    $_.LastReportedStatusTime -lt (Get-Date).AddDays(-30)
} | Select-Object FullDomainName, LastReportedStatusTime

WSUS Server Cleanup

Run cleanup after reviewing approvals and confirming that superseding updates cover your deployment groups. Declining all superseded updates blindly can remove updates still needed by clients:

# Cleanup after approval review; retain superseded updates still needed by clients
Invoke-WsusServerCleanup -DeclineExpiredUpdates `
    -CleanupObsoleteUpdates -CleanupObsoleteComputers `
    -CleanupUnneededContentFiles -CompressUpdates

Client vs. server, in one line: wuauclt and usoclient run on the client to talk to WSUS (see the client section above); wsusutil.exe and the UpdateServices module run on the WSUS server itself to approve updates and maintain the database. You need both sides to manage patching end to end.


Tool Comparison and Best Practices

Understanding which Windows Update tool to use for your environment ensures optimal update management efficiency and reliability.

ToolBest ForAdvantagesLimitations
WUAUCLTLegacy systems (Win 7, Server 2012R2)Simple, built-inDeprecated, limited features
USOClientBuilds where its switches work under the configured policyNative update requestsUndocumented behavior varies by build
PowerShellAdvanced automation, enterpriseFlexible, scriptable, detailed controlRequires module installation

Best Practices for Windows Update Management

  • Run update commands from an elevated/administrative prompt when required
  • Test updates in a non-production environment first
  • Schedule updates during maintenance windows to minimize disruption
  • Monitor update installation progress and logs for errors
  • Implement a rollback strategy for critical systems
  • Use PowerShell for enterprise environments requiring detailed control

Troubleshooting Common Issues

Resolve Windows Update failures with comprehensive troubleshooting commands and error code resolution guides.

Reset Windows Update Components

# Run from an elevated prompt after identifying the specific update failure.
# PSWindowsUpdate provides a reset command; review its effects before use.
Reset-WUComponents

Common Windows Update Error Codes

Each row is deep-linkable โ€” share a specific code with โ€ฆ#err-0x8024402f, and the row highlights on arrival.

Error CodeDescriptionSolution
0x80070002File not foundReview update or setup logs to identify the missing file before choosing a repair
0x80070003Path not foundReview update or setup logs to identify the missing path before choosing a repair
0x8024402FExternal cabinet processing completed with errorsInspect Windows Update logs and any filtering software involved in metadata retrieval
0x80240034Update failed to downloadCheck the configured update source, download failure details, and service health
0x80244007SOAP fault while contacting the update serviceInspect the underlying SOAP error and, on WSUS clients, check cookie and server state
0x80244019HTTP 404: requested update-service URI not foundVerify the effective update-service URL and inspect server or proxy logs
0x8024401CHTTP 408: request timed outCheck update-server response, network path, and proxy timeouts

Microsoft's Windows Update error reference defines the update-specific codes above. A code narrows the investigation; it does not identify a universal repair.

Error Resolution Commands

# Inspect the effective WinHTTP proxy before changing any network settings
netsh winhttp show proxy

# Check the configured WSUS URL, if the device is WSUS-managed
Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name WUServer -ErrorAction SilentlyContinue

# Check and repair system files
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth

# View detailed Windows Update log
Get-WindowsUpdateLog

# Read recent Windows Update client events
Get-WinEvent -LogName 'Microsoft-Windows-WindowsUpdateClient/Operational' -MaxEvents 50 | Format-Table TimeCreated, Id, Message -AutoSize

Diagnostic Commands

# Check Windows Update service status
Get-Service wuauserv, bits, cryptsvc | Format-Table Name, Status, StartType

# Check update installer status (PSWindowsUpdate)
Get-WUInstallerStatus

# View pending updates and their status
Get-WindowsUpdate -Verbose

# Check last successful update check
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect" | Select-Object LastSuccessTime

# Verify update history with exit codes
Get-WUHistory | Where-Object {$_.Result -ne "Succeeded"} | Format-Table Date, Title, Result -AutoSize

# Test connectivity to Microsoft update servers
Test-NetConnection -ComputerName "update.microsoft.com" -Port 443
Test-NetConnection -ComputerName "download.windowsupdate.com" -Port 443

Advanced Troubleshooting Script

Collect service state and update events before changing update components. Use a reset procedure suited to the specific error and Windows build only after reviewing these results.

Get-Service wuauserv, bits, cryptsvc | Format-Table Name, Status, StartType
Get-WinEvent -LogName 'Microsoft-Windows-WindowsUpdateClient/Operational' -MaxEvents 50 |
    Select-Object TimeCreated, Id, LevelDisplayName, Message
Get-WindowsUpdateLog

Get our free Windows Patching Toolkit resourceDownload on inventivehq.com โ†’

Advanced Use Cases and Automation

Real-world scenarios and automation examples for enterprise Windows update management.

Bulk Server Update Deployment

Deploy updates across multiple servers with progress monitoring and reporting.

# Define server list
$servers = Get-Content "C:\servers.txt"

# Dispatch update jobs; this records dispatch, not installation success
$results = @()
foreach ($server in $servers) {
    Write-Host "Processing $server..." -ForegroundColor Cyan
    try {
        $result = Invoke-WUJob -ComputerName $server -Script {
            Import-Module PSWindowsUpdate
            Install-WindowsUpdate -AcceptAll -IgnoreReboot
        } -RunNow -Confirm:$false

        $results += [PSCustomObject]@{
            Server = $server
            Status = "Dispatched; verify update history and reboot state on target"
            Time = Get-Date
        }
    } catch {
        $results += [PSCustomObject]@{
            Server = $server
            Status = "Failed: $($_.Exception.Message)"
            Time = Get-Date
        }
    }
}

# Export dispatch results to CSV; query each target for installation results later
$results | Export-Csv "C:\UpdateResults.csv" -NoTypeInformation

Maintenance Window Automation

Create maintenance windows with pre- and post-update checks. Arrange a tested backup or recovery method before running this on a production server.

# Maintenance window script with safety checks
$maintenanceScript = {
    # Confirm a separate backup or recovery plan before running this script

    # Check available disk space
    $disk = Get-PSDrive C
    if ($disk.Free -lt 10GB) {
        Write-Host "Insufficient disk space! Aborting." -ForegroundColor Red
        exit 1
    }

    # Install updates
    Write-Host "Installing updates..." -ForegroundColor Yellow
    $updates = Install-WindowsUpdate -AcceptAll -IgnoreReboot -Verbose

    # Post-update verification
    Write-Host "Verifying installation..." -ForegroundColor Yellow
    $failed = Get-WUHistory -Last 10 | Where-Object {$_.Result -eq "Failed"}

    if ($failed) {
        Write-Host "Some updates failed. Review required." -ForegroundColor Red
        $failed | Format-Table Date, Title, Result
    } else {
        Write-Host "No failed entries found in the sampled history; verify all requested updates and reboot state." -ForegroundColor Yellow
    }

    # Schedule a reboot separately within the approved maintenance window if required
}

# Execute during an approved maintenance window; confirm target-side results
Invoke-Command -ComputerName "ProductionServer" -ScriptBlock $maintenanceScript

Update Compliance Reporting

Generate an update inventory for review. Pending updates from one source alone do not establish compliance with organizational policy.

# Generate an update inventory for the listed servers
$servers = Get-Content "C:\servers.txt"
$report = @()

foreach ($server in $servers) {
    $pending = Get-WindowsUpdate -ComputerName $server -MicrosoftUpdate
    $lastUpdate = Get-WUHistory -ComputerName $server -Last 1

    $report += [PSCustomObject]@{
        ServerName = $server
        PendingUpdates = $pending.Count
        LastUpdateDate = $lastUpdate.Date
        LastUpdateTitle = $lastUpdate.Title
        RebootRequired = (Get-WURebootStatus -ComputerName $server).RebootRequired
        ScanStatus = if ($pending.Count -eq 0) {"No updates returned by this scan"} else {"Updates returned by this scan"}
    }
}

# Export scan results to HTML; validate source, approvals, and scan health separately
$report | ConvertTo-Html -Title "Windows Update Compliance Report" |
    Out-File "C:\ComplianceReport.html"

# Send the saved report through your organization's approved secure mail service.

Microsoft marks Send-MailMessage obsolete and says it does not guarantee secure SMTP connections. Use an approved secure mail service to distribute this report.

Offline Update Installation

Deploy updates on systems without internet connectivity using offline MSU packages.

# On a connected computer, enter the KB article ID for an applicable update
$kb = Read-Host "KB article ID (for example, KB1234567)"
New-Item -ItemType Directory -Path "C:\OfflineUpdates" -Force | Out-Null
Get-WUOfflineMSU -KBArticleID $kb -Destination "C:\OfflineUpdates"

# Review the downloaded MSU's architecture and applicability before transfer

# Install from MSU files on offline system
$msuFiles = Get-ChildItem "C:\OfflineUpdates\*.msu"
foreach ($msu in $msuFiles) {
    Write-Host "Installing $($msu.Name)..." -ForegroundColor Cyan
    $process = Start-Process wusa.exe -ArgumentList "`"$($msu.FullName)`" /quiet /norestart" -Wait -PassThru
    Write-Host "$($msu.Name): wusa exit code $($process.ExitCode)"
    if ($process.ExitCode -ne 0) {
        Write-Warning "Review the wusa result for $($msu.Name), including whether a reboot is required."
    }
}

# Confirm each package in update history and check pending reboot state.
Get-WUHistory
Get-WURebootStatus

For a mounted Windows image, follow Microsoft's offline DISM package-servicing procedure, which targets the mounted image with /Image:<mount-path>. /Online targets the running Windows installation.


Version-Specific Considerations

Important compatibility notes and version-specific behaviors for different Windows releases.

Windows 11 (23H2 / 24H2)

  • USOClient command behavior can vary by build and policy
  • Enhanced Windows Update settings in System Settings
  • Recovery and uninstall options depend on the update type and configured retention period
  • Get-WindowsUpdateLog converts Windows Update ETL traces into a readable log
  • Driver update availability depends on the device, update source, and policy

Windows 10 Versions

  • Check whether usoclient.exe is present and whether each requested action works on the target build
  • Check update history rather than assuming a command completed the workflow
  • For LTSC and LTSB releases, test update behavior before deployment

Windows Server

  • Verify USOClient availability, behavior, and policy before automation; use a supported PowerShell approach where appropriate
  • Server 2012 R2: Check supported legacy client commands and module compatibility before automating
  • Server Core: Use supported command-line and remote management tools for the installed release
  • Note: Windows Server typically requires manual reboot approval

Compatibility Warnings

Important: usoclient scaninstallwait is undocumented, and its behavior can vary by build and policy. Test update requests on representative systems before production use, and verify the resulting update state. Group Policy and third-party security software can affect update behavior.

Frequently Asked Questions

How do I force Windows Update from command line?

On Windows 10/11, 'usoclient startscan' requests an update scan; 'startdownload' and 'startinstall' request later stages, but behavior varies by build and policy. For PowerShell, use 'Install-WindowsUpdate -MicrosoftUpdate -AcceptAll' after installing the PSWindowsUpdate module. On legacy systems, 'wuauclt /detectnow' requests detection. Check update history to confirm results.

What's the difference between USOClient StartScan and ScanInstallWait?

'usoclient startscan' requests an update scan. 'scaninstallwait' may request a broader workflow on some builds, but it is undocumented and should not be treated as a reliable wait-for-completion command. Check update status and logs to confirm what happened.

Can I schedule USOClient commands?

You can schedule a tested update script with Windows Task Scheduler. Choose an account with the needed update permissions that can run unattended, test the task under that identity, and check its run result, update history, and reboot state. PSWindowsUpdate scheduling parameters depend on the installed module version; inspect its help before using them.

How do I check for updates without installing them?

Where available, 'usoclient startscan' requests a scan; check the resulting update state because the switch is undocumented. With PowerShell, use 'Get-WindowsUpdate -MicrosoftUpdate' to list available updates without installing. Add '-Verbose' for more output.

What PowerShell modules work with Windows Update?

PSWindowsUpdate is a community module for querying and installing updates. Install it with 'Install-Module PSWindowsUpdate', then inspect its installed commands with 'Get-Command -Module PSWindowsUpdate'. Cmdlet names and parameters vary by module version; Windows also provides separate native tools for servicing and update diagnostics.

How do I update remote computers via command line?

For remote systems, test the PSWindowsUpdate module's '-ComputerName' support or use 'Invoke-WUJob' after checking its help on the installed version. Configure remoting, permissions, and the module on targets; verify each target's update history and reboot state afterward. USOClient runs locally.

What's the WSUS command equivalent for USOClient?

For legacy WSUS-managed clients, 'wuauclt /reportnow' requests status reporting and 'wuauclt /detectnow' requests detection. On modern clients, use Windows Update policy to select WSUS and verify the effective update source before using PSWindowsUpdate.

How do I view Windows Update history via command line?

Use PowerShell: 'Get-WUHistory' shows recent update history with the PSWindowsUpdate module. To see failed updates: 'Get-WUHistory | Where-Object {$_.Result -ne "Succeeded"}'.

How do I install a specific KB update from command line?

With PSWindowsUpdate, filter an update by its KB article ID using 'Install-WindowsUpdate -KBArticleID <KB-ID> -AcceptAll' after confirming it is offered by the configured source. For an applicable downloaded MSU, 'wusa.exe C:\path\update.msu /quiet /norestart' requests installation; inspect its exit code, then verify update history and pending reboot state.

How do I reset Windows Update components via command line?

First use the Windows Update troubleshooter and inspect the update history and logs. If a cache reset is needed, follow a documented reset procedure for the affected Windows build and back up relevant state; do not assume deleting the update cache fixes every error.