Re: How to find "LastLogonTime" for users
- From: "Athif [MVP-Windows Server]" <zkathif@xxxxxxxxxxx>
- Date: 10 Jul 2005 23:26:48 -0700
Hi Torgeir,
Thanks for the excellent reply. As you pointed, I am trying
(http://www.rlmueller.net/Last%20Logon.htm).vbs script of Richard
Mueller [MVP] and I actually have some queries. Please note that we are
still in mixed mode.
1. Can we run this .vbs script to check only for one specific domain
controller (I understand this information is not replicated, but
still). On WAN Links, it will be very tough, there should be a way!
2. How to customize to check "LastLogonTime" only for specific user to
save time & WAN Link. Can we manipulate somewhere on strFilter =
"(&(objectCategory=person)(objectClass=user))" or somewhere else??
3. For some users the "LastLogonTime" is 1/1/1601. What does this mean?
Thanks again.
Good day,
Mohammed Athif Khaleel
MVP - Windows Server
I Blog on http://msmvps.com/athif/
Torgeir Bakken (MVP) wrote:
> Hi,
>
> You could e.g. take a look at this post from Richard Mueller:
> http://groups.google.co.uk/group/microsoft.public.scripting.vbscript/msg/596286cbb2f31d2e
>
> The scripts he refers to could easily be changed to only list those
> that have not logged in for more than 100 days, or obtain the logon
> time for one specific user only.
>
> Alternatively, if the domain functional level is set to Windows Server
> 2003, you can check on the LDAP property lastLogonTimestamp, it is
> replicated between the DCs.
>
> Note that this value is only updated when the user logs in if a week
> has passed since the last update (so it is usable only to see if an
> account have been active on a weekly basis).
>
>
> A "Scripting Guys" article about lastLogonTimestamp:
>
> Dandelions, VCR Clocks, and Last Logon Times: These are a Few of Our
> Least Favorite Things
> http://www.microsoft.com/technet/scriptcenter/topics/win2003/lastlogon.mspx
>
>
> From the docs for lastLogonTimestamp:
>
> http://msdn.microsoft.com/library/en-us/adschema/ad/adam_a_lastlogontimestamp.asp
>
> <quote>
> Last-Logon-Timestamp
> This is the time that the user last logged into the domain. This value
> is only updated when the user logs in if a week has passed since the
> last update. This value is replicated.
> </quote>
>
> http://www.microsoft.com/resources/documentation/WindowsServ/2003/enterprise/proddocs/en-us/dsadmin_concepts_accounts.asp
>
> <quote>
> When the domain functional level has been set to Windows Server 2003,
> a new lastLogonTimestamp attribute is used to track the last logon
> time of a user or computer account.
> </quote>
>
>
> The above is relevant for both user and computer accounts. Note the
> once a week update only part and the Windows Server 2003 domain
> functional level prerequisite.
>
>
> Raise the domain functional level; Windows Server 2003
> http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/sag_changedomlevel.asp
>
> Raising the Roof on Domain Functional Levels
> http://www.networking.earthweb.com/netos/article.php/3298531
>
>
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
.
- Follow-Ups:
- Re: How to find "LastLogonTime" for users
- From: Torgeir Bakken \(MVP\)
- Re: How to find "LastLogonTime" for users
- From: Athif [MVP-Windows Server]
- 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\)
- How to find "LastLogonTime" for users
- Prev by Date: Create FTP user on the fly from script or ASP.NET page - possible
- Next by Date: Re: How to find "LastLogonTime" for users
- Previous by thread: Re: How to find "LastLogonTime" for users
- Next by thread: Re: How to find "LastLogonTime" for users
- Index(es):
Relevant Pages
|