i am trying to Filter out some EventIDs from Get-Event log like this :
...More code here
Get-EventLog -LogName $_ -EntryType Warning,Error |
Where-Object {$_.EventID -ne '0|1|2|3|4|7|8|9|10|14|15|17...'}
However i am running into trouble with the comparator, using -ne simply does not Filter anything out, and if i use -notmatch, it returns only one result, and i have confirmed there are a lot that it's skipping. Not sure what i am missing and why it's -ne is not working at all, any help is appreciated! Thanks a lot in advance !