Last active
September 24, 2015 13:41
-
-
Save cat5inthecradle/b8feebf2abc58aa888b5 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
| # Ok, so this is cheating and actually checks for the most | |
| # recent time the Event Log service started, but 99% of | |
| # the time this'll do. | |
| $xml=@' | |
| <QueryList> | |
| <Query Id="0" Path="System"> | |
| <Select Path="System">*[System[(EventID=6005)]]</Select> | |
| </Query> | |
| </QueryList> | |
| '@ | |
| Get-WinEvent -FilterXml $xml -MaxEvents 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment