I\'m trying to read the event log for a security audit for all users except two, but is it possible to do that with the -notlike operator?
-notlike
It\'s somethi
Easiest way I find for multiple searches is to pipe them all (probably heavier CPU use) but for your example user:
Get-EventLog -LogName Security | where {$_.UserName -notlike "*user1"} | where {$_.UserName -notlike "*user2"}