Skip to content

Instantly share code, notes, and snippets.

@theagreeablecow
Created June 2, 2012 02:23
Show Gist options
  • Save theagreeablecow/2856224 to your computer and use it in GitHub Desktop.
Save theagreeablecow/2856224 to your computer and use it in GitHub Desktop.
Event Log XML Filter
$filterxml = '<QueryList>
<Query Id="0" Path="Microsoft-Windows-PrintService/Operational">
<Select Path="Microsoft-Windows-PrintService/Operational">*[System[(EventID=307)]]</Select>
</Query>
</QueryList>'
$EventLog = Get-WinEvent -Filterxml $filterXml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment