How to use "where-object -ne array"? Hi guys,

I'm trying to list all event log items that I need to examine, and I know that some events can be safely ignored so I want to add those to an array. I just can't get the code to work at the moment.

This works:

    $SafeToIgnore = '157'
    Get-EventLog -LogName System -EntryType Error, Warning -After (Get-Date).AddDays(-7) |
    Where-Object -FilterScript {
        $_.EventID -ne $SafeToIgnore
    }

but when I make the first variable an array like this:

    $SafeToIgnore = @('58','157')
    Get-EventLog -LogName System -EntryType Error, Warning -After (Get-Date).AddDays(-7) |
    Where-Object -FilterScript {
        $_.EventID -ne $SafeToIgnore
    }

Then all results are returned including 58 and 157, as in my example here. Any idea of the proper way to write this?

Thanks
