Windows 10: Trigger detecting updates from command line


since Windows 10 the command wuauclt /detectnow does not work anymore.

You can simply use the Comject Object Microsoft.Update.AutoUpdate within powershell (in evelated/administrator mode) to trigger Windows Update for detecting new updates.

(new-object -Comobject Microsoft.Update.AutoUpdate).detectnow()

To Install all downloaded Updates and restart the computer if requiered:

$oInstaller=(New-Object -ComObject Microsoft.Update.Session).CreateUpdateInstaller()
$aUpdates=New-Object -ComObject Microsoft.Update.UpdateColl
((New-Object -ComObject Microsoft.Update.Session).CreateupdateSearcher().Search("IsAssigned=1 and IsHidden=0 and IsInstalled=0 and Type='Software'")).Updates|%{
if($oInstaller.Updates.count -ge 1){
  write-host "Installing " $oInstaller.Updates.count "Updates"
} else {
  write-host "No updates detected"

Or use the Windows Update Powershell Module which provides a set of command-lets for handling windows updates.

Newer Version of Windows 10 uses the usoclient command line utility. There are 4 options

usoclient StartScan
usoclient StartDownload
usoclient StartInstall
usoclient RestartDevice


Advertisment to support

One thought on “Windows 10: Trigger detecting updates from command line”

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.