Windows AD – Get list of users, enabled status, and time of last logon. (PowerShell)
Get-ADUser -Filter * -Properties * | `
Select-Object Name,Enabled, @{Name="Last Successful Logon";Expression={[datetime]::FromFileTime($_.'lastLogonTimeStamp')}} | `
Sort-Object "Last Successful Logon"