black and white laptop computer

Easily find out which Windows Updates are installed with PowerShell

Easily find out whether an update or patch is installed. Or not... With PowerShell

Home » Easily find out which Windows Updates are installed with PowerShell

When your Windows PC or server runs for a while, you sometimes may have to find out whether an update or patch is installed. Or not… Just like installing Windows Updates using PowerShell, this is done quickly and easily with PowerShell.

This post shows you how to use PowerShell to verify whether an Windows update is installed or not, and how to get all installed updates.

If you use PowerShell to list installed updates you have to start PowerShell as administrator, in an elevated prompt. It goes like:

  1. Press the Start button or Windows key on your keyboard
  2. start typing powershell and the option will soon be shown
  1. Choose Run as Administrator

The PowerShell cmdlet you use for getting installed updates and hot fixes is Get-HotFix:

The Get-Hotfix cmdlet gets hotfixes, or updates, that are installed on the local computer or specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.

Get-HotFix

PS C:\WINDOWS\system32> Get-HotFix
 Source        Description      HotFixID      InstalledBy          InstalledOn
 ------        -----------      --------      -----------          -----------
 DESKTOP-JS… Update           KB4586876     NT AUTHORITY\SYSTEM  12/1/2020 12:00:00 AM
 DESKTOP-JS… Update           KB4534170     NT AUTHORITY\SYSTEM  3/23/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4537759     NT AUTHORITY\SYSTEM  3/23/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4545706     NT AUTHORITY\SYSTEM  3/23/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4557968     NT AUTHORITY\SYSTEM  5/13/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4560366     NT AUTHORITY\SYSTEM  6/10/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4561600     NT AUTHORITY\SYSTEM  6/10/2020 12:00:00 AM
 DESKTOP-JS… Update           KB4562830     NT AUTHORITY\SYSTEM  12/8/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4566785     NT AUTHORITY\SYSTEM  7/14/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4570334     NT AUTHORITY\SYSTEM  8/12/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4577266     NT AUTHORITY\SYSTEM  9/9/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4580325     NT AUTHORITY\SYSTEM  10/14/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4586864     NT AUTHORITY\SYSTEM  11/10/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4593175     NT AUTHORITY\SYSTEM  12/8/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4592438     NT AUTHORITY\SYSTEM  12/8/2020 12:00:00 AM
 DESKTOP-JS… Update           KB4592784     NT AUTHORITY\SYSTEM  12/1/2020 12:00:00 AM

Unfortunately Get-HotFix reports a wrong timestamp for installation. More on that later.

See also  IIS Outbound Rules with gzip compression
One-time donation

Your donation helps support me in the ongoing costs running a blog like this one. Costs like coffee ☕, web hosting services, article research, and so on. Thank you for your support❤️ https://www.paypal.com/paypalme/jreilink.

You can also get a specific HotFixID:

PS C:\Users\administrator> Get-HotFix -Id KB4586876
 Source        Description      HotFixID      InstalledBy          InstalledOn
 ------        -----------      --------      -----------          -----------
 DESKTOP-JS… Update           KB4586876     NT AUTHORITY\SYSTEM  12/1/2020 12:00:00 AM

And which security updates are installed:

PS C:\Users\administrator> Get-HotFix -Description Security*
 Source        Description      HotFixID      InstalledBy          InstalledOn
 ------        -----------      --------      -----------          -----------
 DESKTOP-JS… Security Update  KB4537759     NT AUTHORITY\SYSTEM  3/23/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4545706     NT AUTHORITY\SYSTEM  3/23/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4557968     NT AUTHORITY\SYSTEM  5/13/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4560366     NT AUTHORITY\SYSTEM  6/10/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4561600     NT AUTHORITY\SYSTEM  6/10/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4566785     NT AUTHORITY\SYSTEM  7/14/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4570334     NT AUTHORITY\SYSTEM  8/12/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4577266     NT AUTHORITY\SYSTEM  9/9/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4580325     NT AUTHORITY\SYSTEM  10/14/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4586864     NT AUTHORITY\SYSTEM  11/10/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4593175     NT AUTHORITY\SYSTEM  12/8/2020 12:00:00 AM
 DESKTOP-JS… Security Update  KB4592438     NT AUTHORITY\SYSTEM  12/8/2020 12:00:00 AM

If you want a detailed listing of all updates that were installed today, you have to filter dates between yesterday and tomorrow (yes, really…):

$Yesterday = (Get-Date).AddDays(-1).ToString('MM-dd-yyyy')
$Tomorrow = (Get-Date).AddDays(+1).ToString('MM-dd-yyyy')
Get-HotFix | ?{
  $_.InstalledOn -gt "${Yesterday}" -AND $_.InstalledOn -lt "${Tomorrow}"
}

Use this to verify whether all updates are successfully installed after you installed Windows Updates using PowerShell.

0 0 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback
Install Windows Updates using PowerShell - Sysadmins of the North
2025-10-15 9:54 am

[…] you verify installed Windows updates with PowerShell […]

trackback
Install SQL Server cumulative updates silently - Sysadmins of the North
2025-10-15 9:55 am

[…] Afterwards you verify installed Windows updates with PowerShell too. […]