WUAUCLT.exe

Windows Update Agent, download new Windows Update files.

Syntax
      WUAUCLT Options

Options:

   /a or /ResetAuthorization  Initiate an asynchronous background search for applicable updates.
                              If Automatic Updates are disabled, this has no effect.

   /r or /ReportNow           Send all queued reporting events to the server asynchronously.

   /DetectNow                 Initiate detection right away, Query the WSUS server immediately 
                              to see if any new updates are needed.

WSUS uses a cookie on client computers to store computer group membership when client-side targeting is used. By default this cookie expires an hour after WSUS creates it. If you are using client-side targeting and change group membership, use /ResetAuthorization /detectnow to expire the cookie, initiate detection, and have WSUS update computer group membership.

If Windows Update has been blocked, disabled or failing for a long period of time a long history of updates will build up in the archive, this can cause high CPU use. Resetting the client can help with this, but it will take a long time to run Windows Update afterwards.

Preventing Automatic reboots

In Windows 10, Run gpedit.msc

Navigate to: Computer Configuration ➞ Administrative Templates ➞ Windows Components ➞ Windows Update

Open this and change the "No auto-restart with logged on users for scheduled automatic updates installations" to ENABLED
In the control panel choose Update and Security > Windows Update and manually Click "Check for updates"

Alternatively set this in the registry:

HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU
NoAutoRebootWithLoggedOnUsers
(DWORD=1 to disable automatic reboots)

In Windows 11 the above will no longer work, the most you can do is set 'Working Hours' when Windows will not automatically reboot.

Under Start ➞ Settings ➞ Windows Update you can manually pause updates for 1 to 5 weeks.

The PowerShell script below will set working hours to prevent any Auto Update Restart for the next 10 hours.
If this is set to run every 8 or 9 hours (3 or 4 times per day) via a scheduled task, then no automatic restarts will happen at all.

Do not completely disable reboots 24x7 as that will create a backlog of multiple incomplete system updates, I would recommend allowing a reboot to happen at least once per week.

$HrNow = (get-date).Hour
$StartHr = ($HrNow+23) % 24
$EndHr = ($HrNow+10) % 24
$key = 'HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings'

Set-ItemProperty -path $key -name ActiveHoursStart -Type DWORD -value %StartHr% /f
Set-ItemProperty -path $key -name ActiveHoursEnd -Type DWORD -value %EndHr% /f

Fixing Windows Update when it gets stuck

Open Settings ➞ Troubleshoot Other problems ➞ Windows Update.

In Windows 11, this can be found in Settings ➞ Troubleshoot ➞ Other Troubleshooters.

If that doesn’t work, try deleting Windows Update’s cache by booting into Safe Mode, stopping the wuauserv service, and deleting the files in C:\Windows\Software\Distribution.

If all else fails, download updates manually using the WSUS Offline Update tool.

Examples

Asynchronous background search for applicable updates:

C:\> wuauclt /a /DetectNow

Send all queued reporting events to the server asynchronously:

C:\> wuauclt /r /DetectNow

“We must always change, renew, rejuvenate ourselves; otherwise we harden” ~ Johann Wolfgang von Goethe

Related commands

WUSA - Windows Update Standalone Installer.
wuauserv - The Windows Update Service
Windows Update Troubleshooting - completely reset the Windows Update client settings.
AskWoody.com - Blog with a focus on Windows Update conflicts.
%systemroot%\WindowsUpdate.log
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate


 
© BACK 2 Rank aka Tracer
"Lameness is not a reason for suicide but posing with eliteness is a reason for murders"