Export Windows Update History in Windows 10/11 to Track Failed Patches
Difficulty: Intermediate | Time Required: 15 minutesWindows Update normally shows recent update activity inside the Settings app, but it does not provide a simple “Export” button. If you are troubleshooting failed cumulative updates, driver updates, Microsoft Defender updates, or repeated install attempts, exporting the update history gives you a searchable record you can save, share on WindowsForum.com, or compare over time.
This tutorial shows you how to export Windows Update history in Windows 10 and Windows 11 using PowerShell, then identify failed or partially failed patches.
Prerequisites
Before you begin:- Use an account with administrator rights.
- Make sure PowerShell is available. Windows PowerShell is included with Windows 10 and Windows 11.
- Create a location where you want to save the exported files, such as your Desktop or Documents folder.
- If you are posting logs publicly, review the exported files first and remove anything you do not want to share.
Note: This guide works on Windows 10 and Windows 11. The Settings app layout differs slightly between versions, but the PowerShell method is the most useful because it creates exportable files.
Step 1: Check Windows Update History in Settings
Before exporting anything, it is helpful to confirm what Windows is showing in the normal Update History page.On Windows 11
- Right-click the Start button.
- Select Settings.
- Go to Windows Update.
- Select Update history.
- Review the sections such as:
- Quality Updates
- Driver Updates
- Definition Updates
- Other Updates
On Windows 10
- Right-click the Start button.
- Select Settings.
- Go to Update & Security.
- Select Windows Update.
- Click View update history.
Step 2: Open PowerShell as Administrator
- Right-click the Start button.
- Select Terminal (Admin) or Windows PowerShell (Admin).
- On newer Windows 11 builds, this may open Windows Terminal.
- If Terminal opens with PowerShell, that is fine.
- If prompted by User Account Control, click Yes.
Tip: Administrator rights are recommended because update history and event logs may contain entries that are easier to access from an elevated session.
Step 3: Export Windows Update History to CSV
The following PowerShell script queries the Windows Update Agent history and exports it to a CSV file on your Desktop.Copy and paste this entire script into the elevated PowerShell window:
Code:
$ExportFolder = "$env:USERPROFILE\Desktop\WindowsUpdateHistory"
New-Item -Path $ExportFolder -ItemType Directory -Force | Out-Null
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$HistoryCount = $Searcher.GetTotalHistoryCount()
$ResultMap = @{
0 = "Not Started"
1 = "In Progress"
2 = "Succeeded"
3 = "Succeeded with Errors"
4 = "Failed"
5 = "Aborted"
}
$OperationMap = @{
1 = "Installation"
2 = "Uninstallation"
3 = "Other"
}
$History = $Searcher.QueryHistory(0, $HistoryCount) | ForEach-Object {
[PSCustomObject]@{
Date = $_.Date
Title = $_.Title
Description = $_.Description
Operation = $OperationMap[[int]$_.Operation]
Result = $ResultMap[[int]$_.ResultCode]
HResult = $_.HResult
SupportUrl = $_.SupportUrl
}
}
$CsvPath = Join-Path $ExportFolder "WindowsUpdateHistory.csv"
$History |
Sort-Object Date -Descending |
Export-Csv -Path $CsvPath -NoTypeInformation -Encoding UTF8
Write-Host "Windows Update history exported to:"
Write-Host $CsvPath
Desktop\WindowsUpdateHistoryYou should see:
WindowsUpdateHistory.csvYou can open the CSV file in Excel, LibreOffice Calc, Notepad, or any text editor.
Step 4: Export Only Failed Updates
If you are specifically tracking failed patches, it is useful to create a second file containing only failures, aborted installs, and updates that succeeded with errors.Run this command in the same PowerShell window after running the previous script:
Code:
$FailedPath = Join-Path $ExportFolder "FailedWindowsUpdates.csv"
$History |
Where-Object {
$_.Result -eq "Failed" -or
$_.Result -eq "Aborted" -or
$_.Result -eq "Succeeded with Errors"
} |
Sort-Object Date -Descending |
Export-Csv -Path $FailedPath -NoTypeInformation -Encoding UTF8
Write-Host "Failed update history exported to:"
Write-Host $FailedPath
Code:
WindowsUpdateHistory.csv
FailedWindowsUpdates.csv
Step 5: View Failed Updates Directly in PowerShell
To quickly see failed updates without opening the CSV file, run:
Code:
$History |
Where-Object {
$_.Result -eq "Failed" -or
$_.Result -eq "Aborted" -or
$_.Result -eq "Succeeded with Errors"
} |
Sort-Object Date -Descending |
Format-Table Date, Title, Result, HResult -AutoSize
- The KB number, such as
KB503xxxx - The date and time of the failure
- The Result, such as
Failed - The HResult error code
Step 6: Optional — Export Installed Hotfixes
Windows also includes theGet-HotFix command. This does not show every Windows Update entry, and it usually does not show failed updates, but it is useful for confirming which servicing updates are installed.Run:
Code:
Get-HotFix |
Sort-Object InstalledOn -Descending |
Export-Csv "$env:USERPROFILE\Desktop\WindowsUpdateHistory\InstalledHotfixes.csv" -NoTypeInformation -Encoding UTF8
InstalledHotfixes.csvImportant:Get-HotFixis best used as a confirmation tool. For failed patch tracking, the Windows Update Agent history export is more useful.
Step 7: Optional — Create a WindowsUpdate.log File
For deeper troubleshooting, Windows 10 and Windows 11 use Event Tracing for Windows logs rather than a constantly updated plain-textWindowsUpdate.log file. You can generate a readable log by running:Get-WindowsUpdateLogBy default, this creates a
WindowsUpdate.log file on your Desktop.Use this when:
- Updates fail repeatedly.
- The same KB appears multiple times.
- You need detailed scan, download, or install information.
- Someone on the forum asks for more detailed Windows Update logs.
Note: On modern Windows 10 and Windows 11 versions,Get-WindowsUpdateLogconverts Windows Update trace files into a readable log. It is a snapshot, so run the command again if you need a newer log.
Tips and Troubleshooting Notes
If the history export is empty
If the CSV file is empty or nearly empty, the local update history may have been reset. This can happen after clearing the Windows Update cache, deleting theSoftwareDistribution folder, performing repair actions, or upgrading Windows.If you cannot find a failed KB number
Some entries may be listed as driver updates, definition updates, or feature-related packages without a clear KB number. In that case, check the Title, Description, and Date columns.If Excel displays dates strangely
Open the CSV in Excel, then format the Date column manually:- Select the Date column.
- Right-click and choose Format Cells.
- Select a date/time format.
If a patch keeps failing
Record the following before asking for help:- Windows version, such as Windows 10 22H2 or Windows 11 23H2/24H2
- The failed KB number
- The HResult error code
- Whether it fails during download, install, or restart
- Any recent changes such as driver updates, cleanup tools, or repair installs
winverand pressing Enter.
Conclusion
Exporting Windows Update history is a practical way to track failed patches, compare update attempts over time, and provide useful details when asking for help. The Settings app gives a quick overview, but PowerShell gives you a proper CSV export that can be searched, filtered, archived, or shared.Once you have the failed update list, you can focus on the exact KB number, date, and error code instead of guessing which patch caused the problem.
Key Takeaways:
- Windows 10 and Windows 11 do not include a built-in Update History export button.
- PowerShell can export Windows Update history to CSV.
- A separate failed-update CSV makes troubleshooting much easier.
Get-HotFixis useful for installed updates, but not ideal for failed update tracking.Get-WindowsUpdateLogcan generate a deeper diagnostic log when needed.
This tutorial was generated to help WindowsForum.com users get the most out of their Windows experience.