Re: How to find "LastLogonTime" for users
- From: "Athif [MVP-Windows Server]" <zkathif@xxxxxxxxxxx>
- Date: 11 Jul 2005 02:08:37 -0700
Hi again,
I tried to use the code from
http://www.microsoft.com/technet/scriptcenter/topics/win2003/lastlogon.mspx
but when i execute, i get an error, "lastlogon.vbs(2, 1) Active
Directory: The directory property cannot be found in the cache"
<code>
Set objUser = GetObject("LDAP://CN=Mohammed Athif Khaleel, CN=Users,
DC=a, DC=b, DC=com")
Set objLastLogon = objUser.Get("lastLogonTimestamp")
intLastLogonTime = objLastLogon.HighPart * (2^32) +
objLastLogon.LowPart
intLastLogonTime = intLastLogonTime / (60 * 10000000)
intLastLogonTime = intLastLogonTime / 1440
Wscript.Echo "Last logon time: " & intLastLogonTime + #1/1/1601#
</code>
Any ideas??
Athif
.
- Follow-Ups:
- Re: How to find "LastLogonTime" for users
- From: Torgeir Bakken \(MVP\)
- Re: How to find "LastLogonTime" for users
- References:
- How to find "LastLogonTime" for users
- From: Athif [MVP-Windows Server]
- Re: How to find "LastLogonTime" for users
- From: Torgeir Bakken \(MVP\)
- Re: How to find "LastLogonTime" for users
- From: Athif [MVP-Windows Server]
- How to find "LastLogonTime" for users
- Prev by Date: Re: How to find "LastLogonTime" for users
- Next by Date: video card and monitor
- Previous by thread: Re: How to find "LastLogonTime" for users
- Next by thread: Re: How to find "LastLogonTime" for users
- Index(es):