Solved

Last Logon field is blank in Active Directory CSVDE Export

Posted on 2014-09-30
3
1,037 Views
Last Modified: 2014-10-06
Hi All,

I have a quick question surrounding an Active Directory export that I have been given from a customer's AD environment.

In quite a few records the lastLogon field is empty but the pwdlastset date has a recent entry.

I dont understand how the lastlogon is blank when there is an entry in the pwdlast set field

Would anyone have any ideas?

TJ
0
Comment
Question by:tjoconnor
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Acosta Technology Services
ID: 40352063
It's likely a problem with the script used to perform the export.  I would try the following and see if some of those "blank" users come back with lastlogon results:

get-aduser -filter * -properties lastLogonTimestamp | select name, lastLogonTimestamp |export-csv "output.csv"
0
 

Author Comment

by:tjoconnor
ID: 40352125
Hi Operationnos, thanks for your reply.

Below is the command I used. I believe you are using lastLogonTimestamp whereas I used LastLogon. Would that be the potential reason for this, as I recently learned that 'lastLogonTimestamp' is replicated among all DC's and 'LastLogon' is only present on the DC that you authenticate with.

But ultimately is there a reason why the lastlogon would be blank and pwdlastset would be populated?

CSVDE -f adexport.csv -r objectClass=computer -l DN,cn,objectClass,lastLogon,pwdLastSet,userAccountControl,operatingSystem,operatingSystemVersion,description –u
0
 
LVL 8

Accepted Solution

by:
Acosta Technology Services earned 500 total points
ID: 40352132
I believe you are right on the money.  "pwdlastset" would be available from all DC's, while "lastlogon" would only show the results from the DC that the user was authenticated against.  Using "lastlogontimestamp" should provide you the information you're looking for.  Another option would be to query all DC's for "lastlogon" and then merge the data into a single file; using that data you would also have logon location.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now