Skip to content

Instantly share code, notes, and snippets.

@chadmando
Last active February 22, 2021 22:30
Show Gist options
  • Save chadmando/790c26ac51e41b441755c16d1d66cb93 to your computer and use it in GitHub Desktop.
Save chadmando/790c26ac51e41b441755c16d1d66cb93 to your computer and use it in GitHub Desktop.
# Get all Application Log Events that are "Error" level and
# save to an xml file (deserialize)
$filter = @{LogName="Application"; Level=2}
Get-WinEvent -Filterhashtable $filter |
Export-CliXml -Path "$ENV:USERPROFILE\application_errors.xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment