It seems the ID in filterhashtables for get-winevent is limited to max of 23 items in the array.
Please test this out to see
# there are 23 items in the list. the last id is a real id that will return results so you can see. # just hit ctrl-C to cancel since it could take a long time to list all those events $IDs = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,4648 get-winevent -filterhashtable @{logname="security"; ID = $IDs} # now add a 24th item to the list and run cmd again and notice you get no results $IDs = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,4648,24 get-winevent -filterhashtable @{logname="security"; ID = $IDs}
WHY? Seems to be a hardcoded limit that is undocumented?