User Logon Information Script in Active Directory

If you have more than one DC please run the following script in each DC for getting user logon information.


ᐅGet-ADUser -Filter * -Properties * | Select Displayname,sn,@{N='LastLogon'; E={[DateTime]::FromFileTime($_.LastLogon)}} | Export-csv c:\userlastlogoninfo.csv

Comments

Popular posts from this blog

Exchange Move Request

Organizational unit blank in Exchange admin center

WINDOWS SERVER 2012 “THE USER PROFILE SERVICE SERVICE FAILED THE LOGON. USER PROFILE CANNOT BE LOADED.” WHEN SIGINING INTO A SERVER THROUGH RDP”.