How to check Windows Update History using PowerShell

Windows systems are routinely updated with the latest patches to improve the performance of a system. Microsoft releases the service and patches as part of the free update service to enhance the Windows computing experience. These updates are automatically installed based on the system settings and rarely needs input from the end users. The free updates are a part of Windows maintenance and support that releases software to fix errors effectively. In order to ensure the secure computing, the Windows Update assures that the system is up to date with the latest security patches, hotfixes, and bug fixes.

The users can check on the update history using PowerShell, Command line or one can also check the update history via Windows settings User interface. In this article, we discuss on how to list all the history of Windows Update events using one of the task automation and configuration management tool such as PowerShell. One can also obtain information about all the current hotfixes or quick fix engineering updates that are downloaded as part of the software patches.

Check Windows Update History using PowerShell

Go to the Start menu and search for Windows PowerShell. Right click on it and click on Run as administrator.

In the command line write the following command that lists the Hotfixes that are installed along with their ID, information on Installed on, description, etc.

wmic qfe list

How to check Windows Update History using PowerShell

You can also type the following command to list the hotfixes and its associated description.

get-wmiobject -class win32_quickfixengineering

Additionally, one can also write a query to the computer for Update history and return a pointer to a list of matching records on the Windows system. The queries are written to list the WUA history in a PowerShell by defining some few functions to convert WUA history events of result code to a Name and get the last and latest 50 WUA history. You can modify the objects to list any number of past History of updated events.

# Convert Wua History ResultCode to a Name # 0, and 5 are not used for history # See

function Convert-WuaResultCodeToName
param( [Parameter(Mandatory=$true)]
[int] $ResultCode
$Result = $ResultCode
$Result = "Succeeded"
$Result = "Succeeded With Errors"
$Result = "Failed"
return $Result
function Get-WuaHistory
# Get a WUA Session
$session = (New-Object -ComObject 'Microsoft.Update.Session')
# Query the latest 1000 History starting with the first recordp
$history = $session.QueryHistory("",0,50) | ForEach-Object {
$Result = Convert-WuaResultCodeToName -ResultCode $_.ResultCode
# Make the properties hidden in com properties visible.
$_ | Add-Member -MemberType NoteProperty -Value $Result -Name Result
$Product = $_.Categories | Where-Object {$_.Type -eq 'Product'} | Select-Object -First 1 -ExpandProperty Name
$_ | Add-Member -MemberType NoteProperty -Value $_.UpdateIdentity.UpdateId -Name UpdateId
$_ | Add-Member -MemberType NoteProperty -Value $_.UpdateIdentity.RevisionNumber -Name RevisionNumber
$_ | Add-Member -MemberType NoteProperty -Value $Product -Name Product -PassThru
Write-Output $_
#Remove null records and only return the fields we want
$history |
Where-Object {![String]::IsNullOrWhiteSpace($_.title)} |
Select-Object Result, Date, Title, SupportUrl, Product, UpdateId, RevisionNumber

Then now type the following command to get the updates history events with result date, update title, support URL, and update ID.

# Get all the update History, formatted as a table

Get-WuaHistory | Format-Table

That’s all.

Sourced from

Posted by on , in Category Windows with Tags
Pavithra is a Windows enthusiast, who loves keeping abreast with the latest in the world of technology.


  1. Jeffrey Riggs

    This is really nice. I ran through it but what is still troubling is the Windows 10 against Meltdown and Spectre patches. I get it that if you have the latest patch set, its considered cumulative and can expect you are patched; however, management wants a report showing the patch for these vulnerabilities are installed. For Windows 7, the old KB stays listed so over at another blog it states..
    Look for one of the following KB numbers to confirm he patch has been installed:
    KB 4056894 | KB 4056897
    and that is true for win7… but not win10 as the lastest that shows up is KB409xxxx

  2. José Carlos Gonçalves Junior

    You could also use the dism module and even remove the updates you wish to remove from there.

  3. tustinn rent

    Nice! How to modify this for remote computers, please?

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 8 =