Created
March 7, 2019 22:00
-
-
Save jfrantz1-r7/9375bdaba7eda35af94deddd351b4cad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $query = @" | |
| <QueryList> | |
| <Query Id="0" Path="Microsoft-Windows-PowerShell/Admin"> | |
| <Select Path="Microsoft-Windows-PowerShell/Admin">*[System[(Level=1 or Level=2 or Level=3 or Level=4 or Level=0 or Level=5) and (EventID=4104)]]</Select> | |
| <Select Path="Microsoft-Windows-PowerShell/Operational">*[System[(Level=1 or Level=2 or Level=3 or Level=4 or Level=0 or Level=5) and (EventID=4104)]]</Select> | |
| </Query> | |
| </QueryList> | |
| "@ | |
| Get-WinEvent -FilterXML $query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment