Powershell v5.1+ | How To Get Windows Updates | Single/Multiple Servers | Easy way

Powershell
Windows Update
get windows update Powershell
Powershell get windows update
How to get windows update powershell

Hello There!! I hope you all are doing well.

Today we will discuss following topics related to Powershell

1-How to extract installed windows update/Patches from a single server

2-How to extract installed windows update/Patches from a multiple server

3-How to check on how many server a specific update/KB is installed

As a system admin working in a huge IT environment its important for us to keep our infra complaint to Microsoft Windows Latest Updates.

However managing windows update process w/o any solid tool is very cumbersome. hence Microsoft given us PowerShell đŸ™‚

With the help of PowerShell we can manage windows update by installing them, get windows updated using Powershell command, list windows patches/updates etc.

So open your powershell console/ISE and let’s start…

How to extract installed windows update/Patches from a single server

To see how many patches/updates are installed on a server , use the following Powershell command.

Get-HotFix | Sort-Object -Descending

Output:

How to extract installed windows update/Patches from multiple servers

To see how many patches/updates are installed on multiple servers, use the following Powershell command.

Get-HotFix -ComputerName (Get-Content C:\serverlist.txt) -ErrorAction SilentlyContinue | Ft -AutoSize

Output:

How to check on how many servers a specific update/KB is installed

To check on how many servers a specific KB/Update is installed, use the following command. Here we have taken KB2919442 as an example

Get-HotFix -Id KB2919442 -ComputerName (Get-Content C:\serverlist.txt) -ErrorAction SilentlyContinue | Ft -AutoSize

Output:

You can explore more Get-Hotfix command by using the following command

 help Get-Hotfix -Detailed

If you want more Powershell commands to manage windows update then there is a fine source from where you can download the module and use it.

To download the same visit following link

https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc

So that’s it for today! I hope you enjoyed the blog. Please share if you liked it!

Please do check out my other blog post related to Powershell.

https://learn-inside.com/powershell/

Thank you and Happy reading…