Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $evtIDs = (3,5,1074)
- $evtIDProperties = Get-EventLog -LogName System | where {$evtIDs -contains $_.EventID} | fl -Property *
- $noevtIDs = "No Event ID's exist"
- $countEvtID = (Get-EventLog -LogName System | where {$evtIDs -contains $_.EventID}).count
- if ($countEvtID){$evtIDProperties}
- else{ Write-host $noevtIDs}
Add Comment
Please, Sign In to add comment