Why is lastLogon different from lastLogontimeStamp
Mia Horton
Updated on April 23, 2026
Use the most recent attribute. Lastlogon is only updated on the domain controller that performs the authentication and is not replicated. LastLogontimestamp is replicated, but by default only if it is 14 days or more older than the previous value.
Why is lastLogon and LastLogontimestamp different?
Use the most recent attribute. Lastlogon is only updated on the domain controller that performs the authentication and is not replicated. LastLogontimestamp is replicated, but by default only if it is 14 days or more older than the previous value.
What does LastLogontimestamp mean?
Administrators can use the lastLogontimeStamp attribute to determine if a user or computer account has recently logged onto the domain. Using this information administrators can then review the accounts identified and determine if they are still needed and take appropriate action.
How accurate is LastLogontimestamp?
Lastlogon is precise but shows when the user logged in to that specific DC and is not replicated to others. Basically Lastlogontimestamp is great for your purpose of finding stale objects in AD, but it is not very precise.What does LastLogonDate mean?
LastLogonDate is a converted version of LastLogontimestamp. He was technically right. It’s not a replicated attribute. Instead, it’s a locally calculated value of the replicated value.
How often is LastLogonTimestamp updated?
lastLogontimeStamp (what you are querying) is not updated on every logon, but is replicated to other domain controllers. By default it can be as much as 14 days out of date.
What is lastLogon in Active Directory?
The Active Directory attribute lastLogon shows the exact timestamp of the user’s last successful domain authentication on the regarding domain controller. It doesn’t matter here how the user performed this logon operation – interactive, network, passed-through from a radius service or another kerberos realm.
How do I find msDS LogonTimeSyncInterval?
Changing the ms-DS-Logon-Time-Sync-Interval value is actually quite simple. Right-Click on the domain DN (DC=domain,DC=com) under Default naming context and select Properties. Under Attribute Editor, scroll down to the msDS-LogonTimeSyncInterval attribute and Click Edit.Who last logged into a computer PowerShell?
- Identify the domain from which you want to retrieve the report.
- Identify the LDAP attributes you need to fetch the report.
- Identify the primary DC to retrieve the report.
- Compile the script.
- Execute it in Windows PowerShell.
An empty LastLogonDate property means that the account has never been logged on. You get only these accounts, because you restrict your results to them with the filter clause -not (lastlogontimestamp -like “*”) , which translates to “accounts whose lastLogonTimestamp attribute does not have a value”.
Article first time published onWhat changed lastLogonTimestamp?
Also, Interactive, Network, and Service logons will update the lastLogontimeStamp. So if a user logs on interactively, browses a network share, access the email server or runs an LDAP query, the lastLogontimeStamp attribute will updated if the right condition is met.
How do I get lastLogonTimestamp?
Search for the user account and right click the User object. On the user properties box, click General tab. The lastLogon attribute should reveal the last logon time of user account.
What is PwdLastSet attribute Active Directory?
Pwd-Last-Set attribute (LDAPDisplayName PwdLastSet) represents the date and time that the password for this account was last changed. … When the administrator clicks the “User must change password at next logon” check-box in Active Directory Users and Computers, the Pwd-Last-Set attribute (PwdLastSet) gets set to 0.
How do I list all domain controllers in PowerShell?
Get-AdDomainController cmdlet in PowerShell is used to get a list of domain controllers, IP information. You can use other commands like Get-AdForest, nltest to list all domain controllers.
What is bad password time?
This attribute shows the date and time at which the user last enters an incorrect password to log on to their account.
How can I tell when a domain was last logon?
You can find out the last logon time for the domain user with the ADUC graphical console (Active Directory Users and Computers). Find the user in the AD tree and open its properties; Click on the tab Attribute Editor; In the list of attributes, find lastLogon.
How can I tell who is logged into my computer remotely?
- Hold down the Windows Key, and press “R” to bring up the Run window.
- Type “CMD“, then press “Enter” to open a command prompt.
- At the command prompt, type the following then press “Enter“: query user /server:computername. …
- The computer name or domain followed by the username is displayed.
How can I tell when ad account is disabled?
There is no such a timestamp attribute in AD that indicate account’s disable date. The most reliable one you can refer to is the “whenChanged” at an account’s properties dialog, assuming that no other changes have been made since then.
How do I enable advanced features in Active Directory?
It’s in the menu bar at the top of Active Directory. Click “View” to display the drop-down menu. Check Advanced Features. If you don’t see a checkmark to the left of “Advanced Features” click it to turn on Advanced Features.
What format is LastLogonTimeStamp?
The format of the attribute is a FileTime structure which measures the number of 100 nano-second intervals since January 1st 1601 (UTC time).
Where are Active Directory inactive computers?
Run Netwrix Auditor → Navigate to “Reports” → Expand the “Active Directory” section → Go to “Active Directory – State-in-Time” → Select “Computer Accounts – Last Logon Time” → Click “View” → Adjust the “Inactive Days” parameter if needed → Click “View Report”.
How do I see who is logged into a computer PowerShell?
With PowerShell, getting the account information for a logged-on user of a Windows machine is easy, since the username is readily available using the Win32_ComputerSystem WMI instance. This can be retrieved via PowerShell by using either the Get-CimInstance or Get-WmiObject cmdlet.
How can I tell what workstation a user is logged into?
- The user name.
- The used computer.
- The date of logon.
What is logon count?
LogonCount specifies the number of times that you can log on to the computer by using AutoLogon . This value decrements each time you log on to the computer. You must restart the computer to reset the value of LogonCount . LogonCount must be specified if AutoLogon is used.
How can I tell when Windows 10 last logged in?
- Open Start.
- Search for Event Viewer, click the top result to launch the experience.
- Browse the following path: Event Viewer > Windows Logs > Security.
- Double-click the event with the 4624 ID number, which indicates a successful sign-in event.
What is the WhenChanged attribute?
WhenChanged is an attribute in Microsoft Active Directory and is the date when this object was last changed. WhenChanged value is not replicated and exists in the Global Catalog.
Is PwdLastSet replicated?
The pwdLastSet attribute is a replicated attribute that contains the last time an account’s password was changed. … For user objects you would want to look at the lastLogon and the lastLogonTimeStamp attributes.
Is PasswordLastSet replicated?
User accounts have an attribute called PasswordLastSet, which records the last time a user changed his or her password. Because PasswordLastSet is a replicated attribute, only one domain controller in each domain has to be queried.
How do I see all domain controllers in a domain?
To find all the domain controllers in a domain: DsQuery Server -domain domain_name.com.
How do domain controllers work?
A domain controller (DC) is a server that responds to security authentication requests within a Windows Server domain. … A domain controller is the centerpiece of the Windows Active Directory service. It authenticates users, stores user account information and enforces security policy for a Windows domain.
How do I know if a domain controller is a global catalog?
To find the global catalog servers, expand each domain controller, right-click on NTDS Settings , and select Properties. Global catalog servers will have the box checked beside Global Catalog.