Skip to content

Instantly share code, notes, and snippets.

@jauderho
Created July 25, 2021 22:58
Show Gist options
  • Save jauderho/d9538f53c6a161714c531ed6b295f6d1 to your computer and use it in GitHub Desktop.
Save jauderho/d9538f53c6a161714c531ed6b295f6d1 to your computer and use it in GitHub Desktop.
Summary of events using Get-Eventlog
# from https://stackoverflow.com/questions/63804829/powershell-expand-group-object
Get-EventLog -Logname system -EntryType "Error" |
Group-Object 'InstanceID' | Select-Object Count, Name,
@{Name="Message";Expression={$_.Group.Message | select -first 1}} |
Format-Table -Wrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment