Get-WinEvent Obtain Interactive Logon Messages Only

后端 未结 5 1274
南方客
南方客 2021-01-15 15:13

I am attempting to get this PS script going to pull the Security log from multiple machines and only search for the Event ID of 4624 and only show me the logs that contain \

5条回答
  •  盖世英雄少女心
    2021-01-15 15:32

    EventRecord.properties have logon type in the list. To filter out successful logon events of interactive logon type for today:

    Get-winevent -FilterHashtable @{logname='security'; id=4624; starttime=(get-date).date} | where {$_.properties[8].value -eq 2}
    

提交回复
热议问题