Windows 10: Using the Get-WindowsUpdateLog cmdlet

This post is part of the Windows 10 blog series in which I will look at a number of new functionalities in Windows 10 as well as new functionality in PowerShell 5.0. In every article I will highlight a specific cmdlet or technology and provide additional information about the cmdlet

The recently introduced Get-WindowsUpdateLog cmdlet merges the Windows Update logs that are stored in ETL files together into a single plain text log file. The following command can be used to convert these log to a log file:

1
Get-WindowsUpdateLog -LogPath $env:temp\UpdateLog.log

Get-WindowsUpdateLog

Unfortunately the output from this cmdlet is send directly to the host, so it is not possible to store this information in a variable or to interact with it in a meaningful way. I hope this will be corrected before release as it makes it a bit cumbersome to interact with this cmdlet.

The cmdlet works by a three steps process:

  1. Read Information from the .etl files
  2. Convert to intermediate format, either CSV or XML
  3. Convert the intermediate to text and output to the specified logpath

To view the information stored in the intermediate file, which is in a nice structured format the following code can be used:

1
Import-Csv -Path C:\Users\JAAPBR~1\...\wuetl.CSV.tmp.00000

The converted log is available in the specified path, to open the log file in the default text editor, usually notepad, the Invoke-Item can be used:

1
Invoke-Item -Path $env:temp\UpdateLog.log

NotepadWindowsUpdateLog

Get-WindowsUpdateLog
Get-WindowsUpdateLog
Share

Leave a Reply

Your email address will not be published.