locked
Run Windows Update from command-line / manually cause update check RRS feed

  • Question

  • The old methods for accomplishing this no longer seem to work - used to be

    wuauclt.exe /detectnow

    Read somewhere to try wuauclt.exe /updatenow

    Neither does the trick.  Ideas?

    Thanks! /jim

    Tuesday, August 18, 2015 4:55 AM

Answers

  • Well at least we've confirmed that the old way doesn't work anymore.

    I found a small free utility called ABC-update that does seem to poll the update server.  I will investigate it further to see if it will serve my purpose.

    If anyone else can provide insight please do.

    Best/jim

    • Marked as answer by LagunaJim Monday, August 31, 2015 5:06 PM
    Wednesday, August 19, 2015 9:06 AM

All replies

  • Remove the files from C:\Windows\SoftwareDistribution\Download . Then retry from the admin cmd window with "wuauclt.exe /updatenow" .

    S.Sengupta, Windows Experience MVP

    • Proposed as answer by sanat meti Monday, November 13, 2017 9:25 AM
    Wednesday, August 19, 2015 12:20 AM
  • Hi.  Sorry - no change.

    I updated tonight to the current Insider Preview 10525..

    Tried from elevated cmd prompt wuauclt.exe /updatenow -- no result, no event log entry under Windows Update..

    Stopped wuauserv and deleted all files in \windows\softwaredistribution

    Ran wuauclt.exe /updatenow -- no result, no effect

    Restarted wuauserv and folders/files repopulated under \windows\softwaredistribution

    Performed Manual Windows Update from the "metro" windows update page.

    Tried wuauclt.exe /updatenow -- nada.

    Have you tried the old standard "wuauclt.exe /updatenow" on your own Windows 10 machine?

    /j


    • Edited by LagunaJim Wednesday, August 19, 2015 5:28 AM
    Wednesday, August 19, 2015 5:24 AM
  • Hi LagunaJim,

    I have made a test from my Windows 10 Enterprise machine.
    Yes, the command line won`t work.
    I made a test from my Windows 8.1 machine in the same.
    Every time I run the command line "wuau /detectnow", the Windows Update agent will try to connect to the Windows update server to check for updates immediately on a Windows 8.1 machine (Windowsupdate.log)but the Windows 10 machine won`t do anything.

    Best regards


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.



    Wednesday, August 19, 2015 8:42 AM
  • Well at least we've confirmed that the old way doesn't work anymore.

    I found a small free utility called ABC-update that does seem to poll the update server.  I will investigate it further to see if it will serve my purpose.

    If anyone else can provide insight please do.

    Best/jim

    • Marked as answer by LagunaJim Monday, August 31, 2015 5:06 PM
    Wednesday, August 19, 2015 9:06 AM
  • After upgrading to Windows 10 Pro from Windows 8.1 Pro, I had to replace wuauclt.exe /detectnow with the following one-liner in powershell.

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
    Or you could use a .vbs-script as shown at http://answers.microsoft.com/en-us/windows/forum/windows_10-update/wuaucltexe-detectnow-command-doesnt-work-in/43dc5e35-6efa-432e-8256-d30096678849?auth=1
    • Edited by Sir Sixth Tuesday, January 19, 2016 10:46 PM
    • Proposed as answer by neroxy Tuesday, September 6, 2016 2:29 PM
    Tuesday, January 19, 2016 10:36 PM
  • Thanks a lot, sir. Worked like a charm.
    Tuesday, September 6, 2016 2:30 PM
  • After upgrading to Windows 10 Pro from Windows 8.1 Pro, I had to replace wuauclt.exe /detectnow with the following one-liner in powershell.

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
    Or you could use a .vbs-script as shown at http://answers.microsoft.com/en-us/windows/forum/windows_10-update/wuaucltexe-detectnow-command-doesnt-work-in/43dc5e35-6efa-432e-8256-d30096678849?auth=1
    This worked perfectly on my Windows 10 Pro ver 1607.  This was the only way to get windows update to re-check without rebooting.  Otherwise, it would only show what it found previously in the list.  Thank you!

    Jasen Webster Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Thursday, December 22, 2016 4:39 PM
  • This works! Thank you very much. :)
    Monday, February 20, 2017 8:08 PM
  • After upgrading to Windows 10 Pro from Windows 8.1 Pro, I had to replace wuauclt.exe /detectnow with the following one-liner in powershell.

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
    Or you could use a .vbs-script as shown at http://answers.microsoft.com/en-us/windows/forum/windows_10-update/wuaucltexe-detectnow-command-doesnt-work-in/43dc5e35-6efa-432e-8256-d30096678849?auth=1

    Very helpful on Windows Server 2016 ;)

    Thank you.

    Friday, June 16, 2017 6:17 AM
  • After upgrading to Windows 10 Pro from Windows 8.1 Pro, I had to replace wuauclt.exe /detectnow with the following one-liner in powershell.

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
    Or you could use a .vbs-script as shown at http://answers.microsoft.com/en-us/windows/forum/windows_10-update/wuaucltexe-detectnow-command-doesnt-work-in/43dc5e35-6efa-432e-8256-d30096678849?auth=1
    Thanks! Now can use this to check windows update manually in Windows 10. :)
    Monday, October 23, 2017 1:58 AM
  • In Windows 10 and Windows Server 2016, the command to use now is:

    c:\windows\system32\UsoClient.exe startscan

    Run this command in an elevated CMD window.

    • Proposed as answer by 0skie0 Monday, December 25, 2017 4:03 AM
    Monday, November 27, 2017 4:52 PM
  • UsoClient.exe replaces wuaulctl
    • RefreshSettings – used to quickly enact any settings changes
    • RestartDevice – as the name implies, it restarts the device. Can be used in a script to allow updates to finish installing on next boot.
    • ResumeUpdate – used to tell the tool to resume updating after a reboot.
    • StartDownload – initiates a full download (from Microsoft) of existing updates
    • StartInstall – kicks-off the installation of the downloaded updates
    • ScanInstallWait – Combined Scan Download Install
    • StartInteractiveScan – we’ve yet to get this one to work, but it suggests that the process may work in a GUI
    • StartScan – kicks-off a regular scan

    https://omgdebugging.com/2017/10/09/command-line-equivalent-of-wuauclt-in-windows-10-windows-server-2016/

    Wednesday, January 31, 2018 10:32 PM
  • UsoClient.exe StartScan
    is not the same as pushing the button called Check for updates.  If you click the button the Last checked time changes, however, if you run the command, it looks like it is detecting updates from WSUS but the time does not change.  I have tried almost all these commands and the time will not change, there has to be a different command that is run when you click the button.  This also applies to the above PowerShell script not changing the time Last checked. 
    powershell (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
    At least at best, it is intermittent on different Windows 10 versions.

    • Edited by onefiscus Thursday, April 5, 2018 7:26 PM
    Thursday, April 5, 2018 6:37 PM
  • I switched a while back to a simple freeware utility called "Windows Update Mini-Tool".  Don't let the fact that it's host on a forum in Russia discourage you - works great.

    http://forum.ru-board.com/topic.cgi?forum=5&topic=48142#2
    Thursday, April 5, 2018 8:07 PM
  • For Windows Server 2016:

    Rather than downloading and distributing additional modules and/or utilities I tend to look at what is already there.

    Sconfig can be used for downloading and installing patches so I started looking at what that calls. I noticed in the ReportingEvents.log in c:\windows\softwaredistribution folder and noticed that it regularly called cscript process. Therefore it is using VBScripts to search, download, install Windows updates. Do a search for *.vbs i found Sconfig.vbs. On inspecting the contents of Sconfig.vbs I noticed that it called WUA_SearchDownloadInstall.vbs (which is what runs when you press "6" in sconfig).

    When you run WUA_SearchDownloadInstall.vbs it asks for 2 inputs:

    Search for for (A)ll updates or (R)ecommended updates only?

    (A)ll updates, (N)o updates or (S)elect a single update?

    Therefore If you can pass these 2 inputs to the vbscript then you have your solution.

    Solution:

    Create a input file (say c:\temp\input.txt) and add the following 2 lines:

    A
    A

    Then to automatically install patches run:

    c:\windows\system32\cscript.exe /nologo C:\windows\system32\en-US\WUA_SearchDownloadInstall.vbs<c:\temp\input.txt

    If you want to keep track of progress open powershell and connect to the C:\Windows\SoftwareDisbritution\ReportingEvents.log (either locally or remotly) by running the following:

    Get-Content C:\Windows\SoftwareDistribution\ReportingEvents.log -Tail 1 -Wait

    Reboot the machine once installs are complete.


    • Edited by Mark Haskins Sunday, April 22, 2018 9:14 AM
    • Proposed as answer by Darren.J Sunday, April 22, 2018 9:17 AM
    Sunday, April 22, 2018 9:03 AM
  • Talking of tools - we are using WuInstall for installing updates from command line - it was built exactly for that purpose and basically is a command line wrapper for the Windows Update API with quite a few additional features

    Basically wuinstall /install  or wuinstall /search should do the job whether you want to install or just search what is there

    Wednesday, December 19, 2018 9:40 AM
  • After upgrading to Windows 10 Pro from Windows 8.1 Pro, I had to replace wuauclt.exe /detectnow with the following one-liner in powershell.

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()

    Interesting, I must test this. I am building OEM Task Sequnce media and I want latest 1903 build being upgraded during that.

    MCSE Mobility 2018. Expert on SCCM, Windows 10, ALOVPN, MBAM.

    Monday, June 3, 2019 3:37 PM
  • Windows Server 2016 Standard

    Ran wuauclt.exe /detectnow in elevated PowerShell.  Nothing happened.  Then ran

    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()

    and saw "Checking for updates..." displayed in the Settings > Windows Update panel.

    Many thanks to Sir Sixth for providing this.
    Saturday, June 15, 2019 8:20 PM