PowerTip: Find PowerShell Logging Info

PowerTip: Find PowerShell Logging Info

  • Comments 1
  • Likes

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*

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 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()))}