PowerTip: Find PowerShell Logging Info

Summary: Use a Windows PowerShell cmdlet to retrieve logged information about Windows PowerShell.

Hey, Scripting Guy! Question How can I easily find logged information about Windows PowerShell?

Hey, Scripting Guy! Answer Use the Get-WinEvent cmdlet and look for a LogName with powershell in the name:

Get-WinEvent -LogName *powershell*

Comments (1)

  1. Anonymous says:

    Thank you for this tip! I took it a step further by grabbing just today’s errors Get-WinEvent -LogName *powershell* | where {($_.LevelDisplayName -ilike "Warning") -and ($_.TimeCreated -gt $([datetime](Get-Date).ToShortDateString()))}