WSUS Trigger Reporting

๐Ÿ”’ย Secure Bits ๐Ÿ’ก
๐—ง๐—ฟ๐—ถ๐—ด๐—ด๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด ๐—ฎ ๐—ช๐—ถ๐—ป๐—ฑ๐—ผ๐˜„๐˜€ ๐—ฐ๐—น๐—ถ๐—ฒ๐—ป๐˜ ๐˜๐—ผ ๐—ฟ๐—ฒ๐—ฝ๐—ผ๐—ฟ๐˜ ๐˜๐—ผ ๐—ช๐—ฆ๐—จ๐—ฆ ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐—ฒ ๐˜€๐˜‚๐—ฟ๐—ฝ๐—ฟ๐—ถ๐˜€๐—ถ๐—ป๐—ด๐—น๐˜† ๐˜๐—ฟ๐—ถ๐—ฐ๐—ธ๐˜†ย โ€” each OS version seems to have its own magic command that works.

I got tired of remembering them all and “Check for updates” is not very reliableโ€ฆ ๐˜€๐—ผ ๐—ต๐—ฒ๐—ฟ๐—ฒโ€™๐˜€ ๐—ฎ ๐—ผ๐—ป๐—ฒ-๐—น๐—ถ๐—ป๐—ฒ๐—ฟ ๐˜๐—ต๐—ฎ๐˜ ๐—ฎ๐—น๐˜„๐—ฎ๐˜†๐˜€ ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€:

$UpdateSession = new-Object -com “Microsoft.Update.Session”; $Updates = $UpdateSession.CreateUpdateSearcher().Search($Criteria).Updates; wuauclt /reportnow; usoclient startscan

โœ… Works across OS versions
โœ… Forces a WSUS status report
โœ… Initiates a scan for updates

How do you usually force WSUS reporting?

I have recently opened early access to my new “๐—•๐˜‚๐—ถ๐—น๐—ฑ๐—ถ๐—ป๐—ด ๐—ฎ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—”๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐——๐—ถ๐—ฟ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ๐˜†” course, where students learn about similar topics.