Powershell Security Log Get-EventLog

六月ゝ 毕业季﹏ 提交于 2019-12-03 21:42:58

Use -before and -after parameters to filter the log by date. Use get-help get-eventlog -full to see all the parameters.

The users's last logon is stored in Active Directory. Seems like it would be a lot easier to pull it from there than chewing through event logs.

Chadddada

Use PowerShell to search the Active Directory:

Import-Module ActiveDirectory

Get-QADComputer -ComputerRole DomainController | foreach {
(Get-QADUser -Service $_.Name -SamAccountName username).LastLogon.Value
} | Measure-Latest
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!