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
| Command | Description |
|---|---|
startscan | Request a scan for available updates; verify the result |
startdownload | Request download; confirm behavior on the target build and policy |
startinstall | Request installation; confirm behavior on the target build and policy |
refreshsettings | Request a settings refresh; verify the result |
startinteractivescan | Request an interactive scan; behavior can vary |
restartdevice | Request a restart; check reboot state before using |
scaninstallwait | Undocumented 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
| Command | Description |
|---|---|
/DetectNow | Request update detection on supported legacy clients; download is separate |
/ReportNow | Request status reporting to WSUS on supported legacy clients |
/ResetAuthorization | Reset the WSUS authorization cookie on supported legacy clients; normally pair with /DetectNow when troubleshooting registration |
/UpdateNow | Legacy install request; availability and effect vary by client version |
/ShowSettingsDialog | Legacy 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.
/ReportNowrequests 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.
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.
| Command | Description |
|---|---|
wsusutil.exe checkhealth | Check WSUS server health (results log to Event Viewer) |
wsusutil.exe reset | Re-verify update files and re-download missing or corrupt content |
wsusutil.exe listinactiveapprovals | List approvals made permanently inactive by a change in WSUS server language settings |
wsusutil.exe removeinactiveapprovals | Remove approvals made permanently inactive by a change in WSUS server language settings |
wsusutil.exe deleteunneededrevisions | Purge metadata for unnecessary update revisions; stop the WSUS IIS website first and restart it afterward |
wsusutil.exe export package.cab export.log | Export metadata for an air-gapped / disconnected WSUS |
wsusutil.exe import package.cab import.log | Import that metadata on the disconnected server |
wsusutil.exe movecontent D:\WSUS\ move.log | Move the update content folder to another drive |
wsusutil.exe usecustomwebsite true | Switch 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:
wuaucltandusoclientrun on the client to talk to WSUS (see the client section above);wsusutil.exeand theUpdateServicesmodule 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.
| Tool | Best For | Advantages | Limitations |
|---|---|---|---|
| WUAUCLT | Legacy systems (Win 7, Server 2012R2) | Simple, built-in | Deprecated, limited features |
| USOClient | Builds where its switches work under the configured policy | Native update requests | Undocumented behavior varies by build |
| PowerShell | Advanced automation, enterprise | Flexible, scriptable, detailed control | Requires 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 Code | Description | Solution |
|---|---|---|
0x80070002 | File not found | Review update or setup logs to identify the missing file before choosing a repair |
0x80070003 | Path not found | Review update or setup logs to identify the missing path before choosing a repair |
0x8024402F | External cabinet processing completed with errors | Inspect Windows Update logs and any filtering software involved in metadata retrieval |
0x80240034 | Update failed to download | Check the configured update source, download failure details, and service health |
0x80244007 | SOAP fault while contacting the update service | Inspect the underlying SOAP error and, on WSUS clients, check cookie and server state |
0x80244019 | HTTP 404: requested update-service URI not found | Verify the effective update-service URL and inspect server or proxy logs |
0x8024401C | HTTP 408: request timed out | Check 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-WindowsUpdateLogconverts 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.exeis 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 scaninstallwaitis 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.