Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-ADUser lastLogonTimestamp is reporting blank

$
0
0

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?



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>