Share via


How to run Windows Update Scan from Powershell or CMD

Question

Friday, October 13, 2017 8:29 AM

Hi,

We use an RMM software to manage Windows Updates. 

It uses the Windows Update API to Schedule and Report back installed/missing patches.

One thing it is unable to do is update the 'Last Checked' or 'Last Scanned' time on the Windows 10 Machines.

Is there a command I can run on the machines that will run a scan, but not install the updates?

On older OSs it could be done or we edit the below. 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect\ keys with the (yyyy-mm-dd hh:mm:ss string but these regkeys have since been removed from Windows 10.

Thank you.

All replies (4)

Friday, October 13, 2017 9:08 AM | 2 votes

"wuauclt /detectnow" or "wuauclt /reportnow" might help you?

Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help.


Friday, October 13, 2017 9:52 AM | 1 vote

Hello,

You can scan and install updates using PowerShell as mentioned in this guide:

https://www.kapilarya.com/install-a-specific-windows-update-in-windows-10

Let us know if this helps, Good luck!

Microsoft MVP (Windows and Devices for IT)

Windows Insider MVP

Windows Help & Support [www.kapilarya.com]


Saturday, October 14, 2017 9:28 AM

Or you could go nuclear and use this excellent PowerShell module: https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc

Cheers,
Anton

Vacuum Breather Blog | Wing Commander Saga | Twitter

Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".


Thursday, December 20, 2018 8:45 AM | 3 votes

We are using a third party tool built exaclty for that purpose - it is called WuInstall (http://www.wuinstall.com) and it utilizes the Windows Update API that is used in those scripts mentioned here and packs it into one exe file with many options, but basically

wuinstall /search -> scans searches for all updates that would be available (output can also generated as XML and parsed)

wuinstal /install -> installs the available updates

In combination with psExec, you can use it to run on remote machines as well (servers and clients)