get-aduser not returning lastlogontimestamp

I've ran get-aduser to get all attributes but bizarrely for users it doesn't include the lastlogontimestamp. The same command from get-adcomputer does run and return that field, but get-aduser does not. any theory why that may be. lastlogondate is populated but my understanding was its not particularly accurate and lastlogontimestamp is reflective of any DC last logged into. I am unsure it this is to do with their AD setup or any other theories?
LVL 3
pma111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kevin StanushApplication DeveloperCommented:
Include the exact command that you are using.  If these are new user accounts, it won't be populated until the update mechanism/formula triggers the update.
0
pma111Author Commented:
Its not returning the column at all in the report its not just blank for some users and not others it doesnt return the column
0
pma111Author Commented:
Get-aduser -properties * -filter * | export-csv

Weirdly running the same for get-adcomputer did return that property.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Kevin StanushApplication DeveloperCommented:
Get all properties is sort of messy, so try just instead:

get-aduser -properties name,displayname,lastlogontimestamp -filter *

I suspect that the default view is just leaving this attribute out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
M SCommented:
All "Get-AD*"-CMDLets uses two sets of Properties. Default Properties and Extended Properties.

Default properties will be included in your output, if u do not specify the "-Properties" Parameter. Extended Properties must be specified for being included in your output.

lastlogontimestamp is an extended property :)

Here is an overview of the Default and Extended Properties of "Get-ADUser". MS Technet
1
Naveen SharmaCommented:
Try something like:
Get-aduser -filter * -properties * | ft name,lastlogon,lastlogontimestamp,lastlogondate

Open in new window


The LastLogonTimeStamp Attribute – What it was designed for and how it works:
https://blogs.technet.microsoft.com/askds/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works/

Detect Last Logon Date and Time for all Active Directory Users:
https://www.lepide.com/how-to/track-last-logon-date-and-time-for-active-directory-users.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.