Hi,
I ran a query:
| ldapsearch search="(&(objectClass=user)(!(objectClass=computer)))" attrs="sAMAccountName,distinguishedName,lastLogon,lastLogonTimestamp,division"
I found there are couple accounts witch lastLogon is null. But that field has value when I check that account in Active Directory. It is confusing because only some accounts have that issue.
Tks
Linh
The lastLogon attribute is not replicated between domain controllers. You may be getting a null value if the user has not logged on using the domain controller that ldapsearch is connecting to.
When I run a script in PowerShell on the same user, the PowerShell script returns a non-null value, while the app Active Directory still receives null value. It is very strange.
Tks
Louis