Skip to content

Instantly share code, notes, and snippets.

@ceramicskate0
Forked from mattifestation/EnableAMSILogging.ps1
Created February 28, 2019 04:26
Show Gist options
  • Save ceramicskate0/639d4a6edb477bb6c93d55f5528b896a to your computer and use it in GitHub Desktop.
Save ceramicskate0/639d4a6edb477bb6c93d55f5528b896a to your computer and use it in GitHub Desktop.
Enables AMSI logging to the AMSI/Operational event log
# Run this elevated, reboot, boom.
# Feel free to name this whatever you want
$AutoLoggerName = 'MyAMSILogger'
$AutoLoggerGuid = "{$((New-Guid).Guid)}"
New-AutologgerConfig -Name $AutoLoggerName -Guid $AutoLoggerGuid -Start Enabled
Add-EtwTraceProvider -AutologgerName $AutoLoggerName -Guid '{2A576B87-09A7-520E-C21A-4942F0271D67}' -Level 0xff -MatchAnyKeyword 0x80000000000001 -Property 0x41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment