Advertisement
basketcase

Event ID Array

Sep 19th, 2010
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $evtIDs = (3,5)
  2. $countEvtID = (Get-EventLog -LogName System | where {$_.EventID -eq $evtIDs}).count
  3.  
  4. if ($countEvtID -gt 0){write-host "Event ID's Exist"}
  5. else{Write-Host "Event ID's Don't exist" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement