Posts

Showing posts from April, 2016

PowerShell way to parse Windows Update log: Get-PSWindowsUpdateLog

Image
Windows Update, not a fun thing to work with when you need find details in the WindowsUpdate.log. The log has a ton of great information but really hard for with human eyes. Again with PowerShell, there is an opportunity to transform the text based log file into PowerShell Custom Ojects. Which will make exporting, filtering, and reporting much easier. Here is the function I build to fetch and parse WindowsUpdate.log. This function works for local or remote computers given that you have permission to the remote system. Check out the screenshots below, they look similar but you can do lots more with the parsed object. Like, pipe them to Out-GridView. :-) Before: After: The function is here: * *

Get-TaskList, a PowerShell wrapper for tasklist command

Image
Today I was helping my desktop support folks troubleshooting workstation performance issues remotely. It appeared that the target Windows computers had no PowerShell enabled. As the result Get-Process couldn't connect. We then fall back to the good old command: tasklist . The text based output, however, was less easy to process. Maybe I'm just spoiled by PowerShell's object based pipeline but look look look how 'pretty' it is. I then spent some Friday afternoon time writing this PowerShell cmdlet: Get-Tasklist . It wraps around the built-in tasklist command and then parses the text-based output to object-based. Next time, troubleshooting with non-PS going to be much easier. With the Out-GridView , you get an elegant way to work with legacy systems remotely. Hope this might help you at some point. Here is the code: