Problem:
How do I find the last login date for an Active Directory User using PowerShell?
Solution:
Get-ADUser -Identity myadaccount -Properties "LastLogonDate"
DailySysAdmin | For all things IT!
A resource for Sys Admins & IT Pros
Problem:
How do I find the last login date for an Active Directory User using PowerShell?
Solution:
Get-ADUser -Identity myadaccount -Properties "LastLogonDate"
Thanks for this tip but it will only query one domain controller (the first one to repond) and that DC may not have the correct last logon date. Domain Controllers do not share this info. What would be the best PS command to query all DCs in the domain and then provide the most recent logon?