Hey guys,
I'm simply looking to get a list of users and their last login, in it's simplest form I'm trying this:
Get-ADUser -filter * -searchbase 'CN=Users,DC=domain,DC=com,DC=au' -Properties name,lastLogonTimestamp | select name,lastLogonTimestamp | out-gridview
Which works in a way, the problem is that most of the 'lastLoginTimestamp' properties are empty. If I go through AD Explorer (from SysInternals) there is definitely a value in that property. Even if I test with my own user name that logs in every day it returns blank.
If they were all blank I would look at a problem in the script, but some of them DO return the correct value.
Is there something I'm missing?