0

Looks like below code does not work

$EventLogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4    908","4964"
$MultipleIDLogEntries={Get-WinEvent -FilterHashtable     @{Logname='security';Id=@($using:EventLogonIDs)}}
Get-PSSession | % {icm -Session $_ -Command $MultipleIDLogEntries}

it returns below for each server

No events were found that match the specified selection criteria. + CategoryInfo : ObjectNotFound: (:) [Get-WinEvent], Exception + FullyQualifiedErrorId : NoMatchingEventsFound,Microsoft.PowerShell.Commands.GetWinEventCommand + PSComputerName : testitservice.cloudapp.net

But if $EventLogonIDs="4624", it just works with no issues.

What is wrong? Thanks!

0 Answers0