Skip to main content

Scripted check for outstanding Windows Updates

Symptoms​

You are managing several Windows servers and want to check for available Windows updates.

Cause​

n/a

Resolution​

This assumes that you are running Powershell as admin and that your account has administrative access to any other named computer.

Use this if "The term 'get-windowsupdate' is not recognized as a name of a cmdlet, function, script file, or executable program."

Install-Module -Name PSWindowsUpdate -RequiredVersion 2.2.0.3

Restart Powershell if you just installed the module

Powershell

To get updates from the local computer only

Get–WindowsUpdate

Or run on multiple computers

foreach ($computer in @('computer1', 'computer2', 'computer3') ) { Get-WindowsUpdate -ComputerName $computer }