fbpx

Windows Update Commands: PowerShell, UsoClient, and  Wuauclt

"Modern architecture with unique window design on a stylish brown building facade"

Keeping Windows systems up-to-date is essential for maintaining security, stability, and performance. Whether you’re troubleshooting update errors, automating update tasks, or managing updates across multiple systems, understanding the available tools is critical. In earlier versions of Windows, the WUAUCLT command-line utility was the go-to solution for managing updates. However, in Windows 10 and Server 2016, this tool has been replaced by the more modern USOClient.

In this article, we’ll cover the key tools and methods for managing Windows updates, including:

  • WUAUCLT: For legacy systems like Windows 7 and Server 2012R2.
  • USOClient: The replacement utility for Windows 10 and later versions.
  • PowerShell: A powerful, flexible option for managing and automating updates on both legacy and modern systems.

You’ll learn the commands, their syntax, and practical examples to help you detect, install, and manage updates more effectively—whether you’re working on a single system or managing updates at scale.

WUAUCLT

The Windows Update Automatic Update Client (WUAUCLT) is a command-line utility used to manage Windows updates on older versions of Windows, such as Windows 7 and Windows Server 2012R2. This tool allows administrators to initiate update scans, report update status to WSUS servers, and perform other update-related tasks.

However, starting with Windows 10 and Windows Server 2016, WUAUCLT has been deprecated and replaced by the USOClient utility. While WUAUCLT is still available on older systems, it’s important to transition to modern tools like PowerShell or USOClient for newer environments to ensure compatibility and efficiency.

Below is a list of common WUAUCLT commands and their purposes:

CommandDescription
/DetectNowDetect and download updates that are available (will vary by system settings)
/ReportNowTell the client to report its status back to the WSUS server
/RunHandlerComServer
/RunStoreAsComServer
/ShowSettingsDialogShow Windows Update settings dialog
/ShowWindowsUpdateShows the windows update dialog box or web page (depending on windows version)
/ResetAuthorizationwhen an update check occurs a cookie is stored that prevents a new update or check for 1 hour. So, you should use this to delete this cookie
/ResetEulasResets the accepted EULA’s
/ShowWUShows the windows update dialog on windows vista and above. Opens Windows update on XP
/SelfUpdateManagedScan for windows updates using WSUS
/SelfUpdateUnmanagedTriggers a windows update scan using the windows update website
/ShowOptionsOpen the windows update settings window
/ShowFeaturedOptInDialogShow Opt-In dialog for featured updates
/DemoUIShow the icons for windows update
/ShowFeaturedUpdatesOpen windows update dialog and shows the featured updates
/ShowWUAutoScan
/UpdateNowInstall updates now

These commands are still valuable for managing updates in legacy systems, particularly in environments using WSUS for centralized patch management.

Examples

See below for some examples of running the wuauclt. All examples should be run from an elevated/administrative command prompt

If all you want to do is detect and install critical updates right now instead of automating them with task scheduler, you would run the following in the command line:

Wuauclt /dectectnow /updatenow

If it is refusing to install, you can run:

Wuauclt /resetauthorization

If you want to have the client report its status back to the WSUS server, you would run:

Wuauclt /reportnow

Powershell

Powershell will give you the most flexibility in installing windows updates. The other methods are fine for simply downloading and installing all updates. However, with the powershell cmdlets you can do things like get a list of updates, search for updates with a specific word in them, then only install those updates.

The first step is to download the powershell module here:
https://www.powershellgallery.com/packages/pswindowsupdate

If you have Powershell verison 5, you can install the module from the powershell gallery by running:

Install-module PSWindowsUpdate

Before you can run any commands, you need to import the windows update module:

Import-Module PSWindowsUpdate

You might need to install the Microsoft Update service. That can be done with this command:

Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d

You can get a list of available cmdlets in the PSWindowsUpdate module with the following command:

Get-command -module PSWindowsUpdate

Get-WURebootStatus: This cmdlet helps determine whether a system reboot is required after installing updates. Checking reboot status is critical for maintaining uptime, especially in production environments where unplanned reboots can disrupt operations.
Example:

Get-WURebootStatus

This will return a simple status indicating if a reboot is pending, allowing administrators to plan accordingly.

Get-WUList: This cmdlet retrieves a list of all available updates from Microsoft Update or WSUS. It’s particularly useful for reviewing updates before installation, ensuring that only the necessary patches or feature updates are selected.
Example:

Get-WUList -MicrosoftUpdate

This command lists updates available from Microsoft Update. You can pair it with filtering techniques to target specific updates based on criteria like keywords or categories.

I have also included a list of commands below:

  • Add-WUOfflineSync
  • Add-WUServiceManager
  • Get-WUHistory
  • Get-WUInstall
  • Get-WUInstallerStatus
  • Get-WUList
  • Hide-WUUpdate
  • Invoke-WUInstall
  • Get-WURebootStatus
  • Get-WUServiceManager
  • Get-WUUninstall
  • Remove-WUOfflineSync
  • Remove-WUServiceManager
  • Update-WUModule

Examples

The most important cmdlet is Get-WUInstall . This will be apparent in the examples below

Download and install updates from Microsoft Update, then reboot:

Get-WUInstall –MicrosoftUpdate –AcceptAll –AutoReboot

**Note, I usually only reboot if required. For that reason, I don’t like to use the AutoReboot flag.

Check if a reboot is required

Get-wurebootstatus

List available updates on Microsoft Update

Get-WUInstall –MicrosoftUpdate –ListOnly

To automate fetching updates, you might also consider running a script to get windowsupdate details directly and act on them.

USOClient

The Update Session Orchestrator (USOClient) is the modern command-line tool introduced in Windows 10 and Server 2016, replacing the legacy WUAUCLT utility. Its primary function is to manage updates by scanning, downloading, and installing them. Unlike WUAUCLT, USOClient operates seamlessly in the background and integrates with the Windows Update system to handle both security patches and feature updates.

What is the USOClient?
USOClient.exe is a legitimate Microsoft process responsible for orchestrating updates. It helps schedule and execute Windows updates, ensuring your system stays up-to-date with the latest features and security patches.

Here are the common USOClient commands and their descriptions:

CommandDescription
startscanscan for updates
startdownloaddownload updates
startinstallinstall updates
RefreshsettingsRefresh settings if any changes were made
StartInteractiveScanOpen a dialog and start scanning for updates
RestartDeviceRestart computer to finish installing updates
ScanInstallWaitScan, Download, and install updates
ResumeUpdateResume installing updates on next boot

Examples

See below for some examples of how to use the USO client. All of these examples should be run in an administrative command prompt

Scan for updates

usoclient startscan

Download updates

Usoclient startdownload

Install updates

usoclient startinstall

FAQ

1. What is the purpose of WUAUCLT?

WUAUCLT, or Windows Update Automatic Update Client, is a legacy command-line utility used to manage Windows updates on older operating systems like Windows 7 and Windows Server 2012R2. It has been replaced by USOClient in Windows 10 and later versions.

2. What replaced WUAUCLT?

In Windows 10 and Server 2016, WUAUCLT was replaced by USOClient (Update Session Orchestrator), which provides a modern, streamlined way to manage updates via the command line.

3. What is the USOClient, and what does it do?

USOClient, short for Update Session Orchestrator, is a command-line tool introduced in Windows 10. It is responsible for managing Windows updates, including scanning, downloading, and installing them.

4. How can I check if my system requires a reboot after updates?

You can use the PowerShell cmdlet Get-WURebootStatus to determine whether a reboot is required. This is especially useful in automated update workflows.

5. What is the command to force a Windows Update check from WSUS?

You can use the following WUAUCLT command to force a Windows Update check from WSUS:

wuauclt /detectnow  

For newer systems, use the USOClient equivalent:

usoclient startscan  

6. Can I disable the USOClient process?

The USOClient process is integral to Windows Update functionality. While it is not recommended to disable it, you can manage how updates are handled through Group Policy or PowerShell scripts.

7. What’s the difference between WUAUCLT, USOClient, and PowerShell for updates?

  • WUAUCLT: Used on older systems to manage updates.
  • USOClient: Replaced WUAUCLT in Windows 10 for command-line update management.
  • PowerShell: The most flexible option, suitable for both legacy and modern systems. PowerShell allows for advanced scripting and automation of update tasks.

8. How do I list available updates without installing them?

Use the PowerShell cmdlet Get-WUList to display a list of all available updates. This is useful for reviewing updates before installation.

9. What is the command to install updates immediately?

  • For WUAUCLT: wuauclt /detectnow /updatenow
  • For USOClient: usoclient startinstall
  • For PowerShell: Get-WUInstall –AcceptAll

10. What’s the best way to automate Windows updates?

The most effective way is to use PowerShell with the PSWindowsUpdate module. This module allows for advanced scripting, scheduling, and targeted update management.

Here are other related links/resources

In case you would like to see some additional information, I have included some links to good resources on these topics:

WSUS Server Cmdlets
http://technet.microsoft.com/en-us/library/hh826166.aspx

Powershell Execution Policy:
http://technet.microsoft.com/en-us/library/ee176961.aspx

Elevate Your IT Efficiency with Expert Solutions

Transform Your Technology, Propel Your Business

Unlock advanced technology solutions tailored to your business needs. At Inventive HQ, we combine industry expertise with innovative practices to enhance your cybersecurity, streamline your IT operations, and leverage cloud technologies for optimal efficiency and growth.