E=mc2
asked on
Modify Powershell AD script to include Last Login
I would l like to modify this script to also include the Last Login.
Get-ADUser -Filter * -Property PasswordLastSet -ResultSetSize $null |
Select-Object -Property SamAccountName, @{n='PasswordLastSet'; e={If ($_.PasswordLastSet) {$_.PasswordLastSet} Else {'<never>'}}}, DistinguishedName |
Export-Csv -NoTypeInformation -Path C:\Temp\PwdLastSet.csv
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.