Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Lastlogon attribure and performance

Reply
Thread Tools Display Modes

Lastlogon attribure and performance

 
 
Jesper Ravn
Guest
Posts: n/a

 
      11-10-2009
Hello

I have created a small application in VB.net where I query AD information.
In the user section I can retrive LastLogon, by query all DC.
My main concern though, is the performance when I list 3000-5000+ users in a
listview.
What is your experience with LastLogon and performance where the enviroment
host mutiple Domain Controlleres in branch office
Should I go down that road or should I pull the LastLogon value from a basic
inventory (Logon script + SQL).
Im already using the LastlogontimeStamp to determine old users and
computers, but the lastlogon attribute, are more up to date and are often
requeted by helpdesk staff.

Thanks,

/Jesper

 
Reply With Quote
 
 
 
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      11-10-2009

"Jesper Ravn" <> wrote in message
news:...
> Hello
>
> I have created a small application in VB.net where I query AD information.
> In the user section I can retrive LastLogon, by query all DC.
> My main concern though, is the performance when I list 3000-5000+ users in
> a listview.
> What is your experience with LastLogon and performance where the
> enviroment host mutiple Domain Controlleres in branch office
> Should I go down that road or should I pull the LastLogon value from a
> basic inventory (Logon script + SQL).
> Im already using the LastlogontimeStamp to determine old users and
> computers, but the lastlogon attribute, are more up to date and are often
> requeted by helpdesk staff.
>


3000-5000 users is not a lot, unless you are binding to the user objects. I
use ADO to query the DC's for all users in bulk (you must turn on paging).
The number of DC's and the speed of the links is more important. I retain
the largest lastLogon value for each user in a dictionary object. Again,
5000 entries is not a lot, and a dictionary object should be more efficient
than an array. The query for lastLogon should be separate from the query for
other attributes that are replicated.

A VBScript example is linked here:

http://www.rlmueller.net/Last%20Logon.htm

I've done similar in classic VB. I added a reference to the Microsoft
Scripting Runtime (scrrun.dll) for the dictionary object, and another for
Microsoft ActiveX Data Objects. I haven't done it in VB.NET.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


 
Reply With Quote
 
Jesper Ravn
Guest
Posts: n/a

 
      11-11-2009


"Richard Mueller [MVP]" <rlmueller-> skrev i
meddelelsen news:...
>
> "Jesper Ravn" <> wrote in message
> news:...
>> Hello
>>
>> I have created a small application in VB.net where I query AD
>> information.
>> In the user section I can retrive LastLogon, by query all DC.
>> My main concern though, is the performance when I list 3000-5000+ users
>> in a listview.
>> What is your experience with LastLogon and performance where the
>> enviroment host mutiple Domain Controlleres in branch office
>> Should I go down that road or should I pull the LastLogon value from a
>> basic inventory (Logon script + SQL).
>> Im already using the LastlogontimeStamp to determine old users and
>> computers, but the lastlogon attribute, are more up to date and are often
>> requeted by helpdesk staff.
>>

>
> 3000-5000 users is not a lot, unless you are binding to the user objects.
> I use ADO to query the DC's for all users in bulk (you must turn on
> paging). The number of DC's and the speed of the links is more important.
> I retain the largest lastLogon value for each user in a dictionary object.
> Again, 5000 entries is not a lot, and a dictionary object should be more
> efficient than an array. The query for lastLogon should be separate from
> the query for other attributes that are replicated.
>
> A VBScript example is linked here:
>
> http://www.rlmueller.net/Last%20Logon.htm
>
> I've done similar in classic VB. I added a reference to the Microsoft
> Scripting Runtime (scrrun.dll) for the dictionary object, and another for
> Microsoft ActiveX Data Objects. I haven't done it in VB.NET.


Hi Richard

Ok, I will give it a try.
I found the link below which is the .NET way to do it.
http://www.codeproject.com/KB/securi...llWindows.aspx

There is also a reference to your script. Thanks again.

/Jesper

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59