T O P

Powershell One-liner to Check Log Files

Troubleshooting Windows Update with a Little PowerShell Magic

Let’s suppose you’ve just joined a computer to a WSUS server, but Windows Update has decided it doesn’t feel like downloading patches today.

Naturally, your first instinct is to check the logs. But who wants to spend their afternoon digging through files looking for an error?

Fortunately, PowerShell can do the dirty work for us.

Back in the day, Windows Update maintained a nice, readable log file. Finding warnings was as simple as:

Get-ChildItem C:\Windows -Filter '*update*.log' -File -Recurse -ErrorAction SilentlyContinue |
    Select-String 'warning'

One line, and PowerShell searches for matching log files, reads their contents, and displays anything containing the word “warning.”

In my case, the result was rather revealing:

WARNING: Failed to find updates with error code 800B0001
WARNING: Digital Signatures are not trusted: Error 0x800b0001
WARNING: SelfUpdate check failed, error = 0x800B0001
WARNING: Skipping scan, self-update check returned 0x800B0001

Aha! There’s our culprit: 0x800B0001, pointing toward a digital signature verification issue.

But wait, it’s not 2013 anymore!

Modern Windows versions (Windows 10, Windows 11, and newer Windows Server releases) no longer maintain the same continuously updated text log. Instead, they use Event Tracing for Windows (ETW).

Not quite as convenient, but PowerShell still has our backs.

First, generate a readable log:

Get-WindowsUpdateLog -LogPath "$env:TEMP\WindowsUpdate.log"

Then search it:

Select-String "$env:TEMP\WindowsUpdate.log" -Pattern 'warning','error','failed'

Or, if you’re feeling particularly efficient, skip the log file altogether and query the Windows Update event log:

Get-WinEvent -FilterHashtable @{
    LogName = 'Microsoft-Windows-WindowsUpdateClient/Operational'
    Level = 2,3
} -MaxEvents 20 | Select-Object TimeCreated, Message

That retrieves up to 20 recent error and warning events, without opening Event Viewer.

And yes, these approaches work with Windows PowerShell 5.1 and modern PowerShell 7 versions.

One last trick

For traditional text logs that are actively being written, you can still watch for errors in real time:

Get-Content C:\Logs\Application.log -Tail 20 -Wait |
    Select-String 'warning','error'

Just remember that this trick doesn’t work directly with modern Windows Update’s binary ETW traces.

The moral of the story?

Windows Update may have changed how it keeps its secrets, but PowerShell is still remarkably good at getting them out.

Happy troubleshooting!

Allow External Senders to Email Google Group

I encountered this one recently. Google doesn’t make it simple (or clear) how to allow external people to send emails to a Google Group (which most people use as the equivalent of a distribution list / Office365 group).

In Google Admin, navigate to the Google Group and check off “Allow” (a checkmark) where Publish Posts and External intersect (seen below with the number 1 in red)

That’s it! External users will now be able to email the group.

Audit Error – Office365

Recently, I was trying to perform an audit search on an Office365 organization and found auditing wasn’t enabled. When I tried to do it straight from the audit screen, I encountered this error:

Sorry! We couldn’t update your organization settings. Please try again.

I went straight to PowerShell and ran Get-AdminAuditLogConfig | FL Unified* and it was not enabled.

To resolve this, I ran Enable-OrganizationCustomization 

And then I ran the Powershell command Set-AdminAuditLogConfig – UnifiedAuditLogIngestionEnabled $true

And that did it!

ESXI Error: Could not find a trusted signer: certificate is not yet valid

It’s been a while and there is plenty of reasons for that, but namely… I got a new job!

Anywho, here is a good one I encountered when trying to update an ESXI host.

Could not find a trusted signer: certificate is not yet valid

Failed to setup patcher for upgrade

Full error and command

I hadn’t used this host in a hot minute and one thing I know is that SSL Certs are time/date-based. I took a look at the date and time in ESXI and lo and behold found an incorrect date.

The incorrect date!

After setting the correct date, I re-ran the command and the ESXI update completed successfully. I also set the server to use NTP so this doesn’t pop up again.