I had a script that export the last logon time:
Get-ADUser -Filter * -Property LastLogonTimestamp | Select SamAccountName,@{Name='Last Logon';Expression={$_.LastLogonTimeStamp.ToString()}} | Export-CSV C:\Export1.csv -NoTypeInformationi want to add the display name of the accounts,
do yours have any solution??