Used translate feature to understand your question. I hope the below is what you need :)
(Get-WinEvent -FilterHashtable @{LogName='Security';StartTime=(Get-Date).Date;Id=4625} -ErrorAction SilentlyContinue | Measure-Object ).count
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
powershell:Get-WinEvent -FilterHashtable @{LogName='Security';Id=5024}
输出:
powershell:Get-WinEvent -FilterHashtable @{LogName='Security';StartTime=Get-Date;Id=4625}
输出:
上面两张图片中,我想实际的需求如下:
请各位指导一下我,谢啦。
Used translate feature to understand your question. I hope the below is what you need :)
(Get-WinEvent -FilterHashtable @{LogName='Security';StartTime=(Get-Date).Date;Id=4625} -ErrorAction SilentlyContinue | Measure-Object ).count