Getting Windows Update History in Plain Text: One Update Per Line

Abstract: Retrieve Windows Update history as plain text by querying Event Logs with PowerShell to list installed updates one per line.

Created: 2026-08-23 by
You can retrieve Windows Update history in plain text by running a PowerShell command that queries the Microsoft-Windows-WindowsUpdateClient event logs. This approach extracts specific event IDs to generate a clean list of installed updates, making it easy to parse or archive your update records without using the graphical interface.

Understanding the Event Log Source

The primary source for update information on modern Windows systems is the Microsoft-Windows-WindowsUpdateClient/Operational event log. While the Settings app provides a user-friendly view, it does not offer a direct export feature for plain text lists. By accessing the underlying event log, you can extract precise data about what was installed, when, and with what result.

This method relies on two key event identifiers. Event ID 19 indicates that an update was successfully installed, while Event ID 20 signifies that an installation failed. By filtering for these specific events, you can create a comprehensive history of all update activities on your machine.

Executing the PowerShell Command

To generate the desired output, open PowerShell as an administrator. This elevation is necessary because reading system event logs requires elevated privileges. Once the console is open, you can use the Get-WinEvent cmdlet to query the log.

Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-WindowsUpdateClient/Operational'; Id=19} | Select-Object -Property TimeCreated, Message | Format-List

The command above filters the log for successful installations (ID 19). The Select-Object parameter ensures that only the timestamp and the message content are returned, stripping away unnecessary XML metadata. However, this initial output may still contain multiple lines per update due to the structure of the Message property.

Formatting Output for Plain Text

To achieve the "one update per line" requirement, you need to process the message field more aggressively. The following script retrieves both successful and failed updates, formats them into a single string, and outputs them cleanly.

$updates = Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-WindowsUpdateClient/Operational'; Id=@(19,20)} -ErrorAction SilentlyContinue
foreach ($update in $updates) {
    $time = $update.TimeCreated.ToString('yyyy-MM-dd HH:mm:ss')
    $msg = $update.Message -replace '\r\n', ' ' -replace '\s+', ' '
    Write-Output "$time - $msg"
}

This script iterates through each event, extracts the creation time, and cleans up the message text by removing newlines and collapsing multiple spaces. The result is a stream of text where each line represents a distinct update event. You can redirect this output to a file using the > operator if you wish to save it.

Handling Large History Sets

If your system has been running for several years, the event log may contain thousands of entries. Processing all of them at once can be slow and may consume significant memory. To mitigate this, you can limit the query to recent dates or a specific number of events.

For example, adding -MaxEvents 50 to the Get-WinEvent command will only retrieve the most recent 50 updates. This is useful for quick checks or when generating reports for troubleshooting recent issues. If you suspect a specific update caused problems, such as those discussed in our guide on Windows 10 Update Stuck: XX% - Fixes, focusing on recent events is often more effective than reviewing the entire history.

Alternative Methods

While PowerShell is the most flexible tool, some users prefer using the wusa.exe utility. Running wusa /uninstall:<KBNumber> allows you to uninstall specific updates, but it does not provide a history list. Another option is the systeminfo command, which lists installed hotfixes, but it lacks timestamps and detailed status messages.

For users who frequently manage update histories, combining this PowerShell script with scheduled tasks can automate the generation of daily or weekly reports. This ensures you always have a plain text record available for auditing purposes.

Common Issues and Troubleshooting

Sometimes, the event log may be empty or inaccessible. This can happen if the Windows Update service is disabled or if the log has been cleared. Ensure that the Wuauserv service is running. Additionally, if you encounter permission errors, double-check that you are running PowerShell with administrative rights.

In rare cases, corrupted event logs can cause Get-WinEvent to fail. If this occurs, you may need to clear the log via the Event Viewer or restart the service. For more complex system issues, such as kernel failures, refer to our article on Resolving Kernel Security Check Failure to ensure your system integrity is not compromised.

Frequently Asked Questions

How do I save the output to a text file?

You can append > C:\UpdateHistory.txt to the end of your PowerShell command. This redirects the standard output to a file named UpdateHistory.txt in the root of your C drive. Ensure the path is writable by your current user account.

Can I filter updates by a specific date range?

Yes, you can add -StartTime and -EndTime parameters to the Get-WinEvent cmdlet. For example, -StartTime (Get-Date).AddDays(-7) will only return updates from the last seven days. This helps narrow down the results for recent troubleshooting.

Why are some updates missing from the list?

Some minor updates or driver installations may not generate Event ID 19 or 20 in the client log. They might be recorded elsewhere or handled silently. Additionally, if the log was manually cleared, historical data will be lost. Regular backups of the event log are recommended for complete auditing.

Is this method compatible with Windows Server?

Yes, the same PowerShell commands work on Windows Server editions. The event log structure is consistent across client and server versions of Windows. However, server environments may have different update policies, so the volume of events might vary significantly.

What should I do if the PowerShell command returns no results?

First, verify that the event log exists by checking Event Viewer under Applications and Services Logs. If the log is present but empty, ensure the Windows Update service is active. If the log is missing entirely, you may need to enable it via Group Policy or re-register the event provider.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More