How to check the history of Windows updates with PowerShell



RECOMMENDED: Click here to fix Windows errors and optimize system performance

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



September 2020 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • 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



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.



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance

Related Video