Are you searching to parse the windowsupdate.log file, the following function is here to help! It will either parse the windowsupdate.log file from your default location, or you can specify an external one.

ps treasureN°2: Parsing WindowsUpdate.log

This time we will add this new function to our treasure chest that parses the windowsUpdate.log file and returns a nice and workable object. In the background it uses Regex to find the different informations, and group them in logical chunks of structured data.

In the end, you get an object that you can easily manipulate with PowerShell, and do some extensive parsing using the techniques that you are familiar with.

In case you are interested in learning the basic building blocks from regex, I recommend you read this article.

WindowsUpdate.Log file explained:

The windowsupdate.log file can look chaotic at first glance, but it Is actually a structured document. Simply there is a lot going on in it.

How to read the WindowsUpdate.log file?

Simply call the function provided here under as followed:

How to get the installed updates from the windowsupdate.log file?

How to filter the messages in the windowsupdate.log file by date?

The function is available here under:

.gist table { margin-bottom: 0; }

Probably we can add more to this function, but for now, it answered my own needs. If you have any improvement suggests, please let me know in the comments 🙂