How to check the history of Windows updates with PowerShell



Updated December 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

Windows systems are regularly updated with the latest patches to improve system performance. 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 system settings and rarely require the participation of end users. Free updates are part of Windows maintenance and support, which frees software for efficient troubleshooting. To ensure secure data processing, Windows Update ensures that the system is up to date with the latest security patches, fixes and bug fixes.

Users can check the update history from PowerShell, the command line or Windows settings. This article explains how to list the complete history of Windows update events using one of the task automation and configuration management tools such as PowerShell. You can also find all current patch updates or quick fix engineering that are downloaded as part of the software patches.

Check Windows update history with PowerShell

December 2024 Update:

You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally, it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

Download Now

Go to Start menu and search for Windows PowerShell. Right-click and click Run as Administrator.

Write the following command in the command line that lists the installed patches with their ID, installed on the information, description, etc..

wmic qfe list

You can also enter the following command to list patches and associated description.

get-wmiobject class win32_quickfixengineering

In addition, you can write a request to the computer for the update history and return a pointer to a list of corresponding records on the Windows system. Queries are written to list the WUA history in a PowerShell by defining some functions to convert the WUA history events of the result code into a name and get the last and last WUA 50 history. You can edit objects to list any number of past events.

# Convert Wua ResultCode history to a name # 0, and 5 are not used for history # See https://msdn.microsoft.com/en-us/library/windows/desktop/aa387095(v=vs.85 ).aspx Function Convert WuResultCodeToName { param([Parameter(Mandatory=$true)]]] int] $ResultCode $ResultCode = $ResultCode switch($ResultCode) { 2 { Result ='Successful'. 3 {Result ='Success with errors'. 4 {Result ='Failed' } } } } }. return $result } return $result } Get-WuaHistory { # Get WUA Session = (New Object - ComObject'Microsoft.Update.Session') Get the history of the last 1000 records of the first session $history = $session. QueryHistory('''''',0,50) | ForEach Object { $Result = Convert-WuaResultCodeToName -ResultCode $_.ResultCode Make hidden properties visible in Com properties $_ | Add-Member -MemberType NoteProperty -Value $Result -Name Result $Product = $_. Categories | Wo-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 the Result object, Date, Title, SupportUrl, Product, UpdateId, RevisionNumber }

Enter the following command to get the update history events with the result date, update title, support URL and update ID.

# Get the complete update history, formatted as a table. Get-WuaHistory | Table Format

That’s it.

De stackoverflow.com.



Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here

Related Video

Scroll to Top