Windows Server - Lastlogon attribure and performance
Asked By Jesper Ravn
10-Nov-09 06:52 AM
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
VB.NET
(1)
VB
(1)
VBScript
(1)
LastlogontimeStamp
(1)
ActiveX
(1)
Controlleres
(1)
Lastlogon
(1)
Directory
(1)
Richard Mueller [MVP] replied to Jesper Ravn
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 have 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 have not done it in VB.NET.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Jesper Ravn replied to Richard Mueller [MVP]
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/security/LastLogonAcrossAllWindows.aspx
There is also a reference to your script. Thanks again.
/Jesper
macro to extract the data from web query. To automate this, I have created one vb.net windows application to execute the macro. And I have created in a schedules task to logged on or not' 2) The user has the Administrator privileges 3) The excel macro, VB.Net EXE has the everyone full access 4) The user is added in the local security Excel 2003 (1) Excel 2010 (1) Hi Pegasus Phillip Windell (1) Privileges (1) Macro (1) VB (1) I do not know anything about vb.net applications but from experience I know that most problems with scheduled tasks are caused by If you require a robust environment then you must use a proper program, e.g. VB Script. Excell has separate security settings on Macros. Check the Macro Security, . . .it might be
Bit (WINDOWS 7) Windows Server Hello, I am using CryptGenRandom() API in one of my VB.Net application. This API is working perfect with WINDOWS XP and Vista OS with 32 bit Additional Information 4: 71302fa4a91436747a963f67bb2f095e ???* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Please assist me. Security Cryptography Discussions Windows 7 (1) Vista (1) VB (1) XP (1) CryptGenRandom (1) StackHash (1) Crypto (1) Underscores (1) Hi, There is no violation under Windows 7 64-bit. I suspect that you have a bug in the VB code calling native CAPI functions that manifests itself on 64-bit platforms. If you need more help, please post your VB code that declares and uses CryptGenRandom. Cheers, - - Mounir IDRASSI IDRIX http: / / www.idrix.fr To 64-Bit, (WINDOWS, 7) description: Hello, I am using CryptGenRandom() API in one of my VB.Net application. This API is working perfect with WINDOWS XP and Vista OS with 32 bit
microsoft.com / en-us / library / ms180906%28VS.80%29.aspx I have converted the C# example to VB.NET. When I use VB.NET 2005 and try to run the example I get the error "There is no such DirectoryServices.AccountManagement (1) Windows XP (1) Windows 2003 Server (1) GrpUGSShareReadWrite (1) AuthenticationTypes.Secure (1) VB.NET (1) DirectoryEntry (1) ChemDepartment (1) If you are going to use that type of path
news group. . . Windows Server I have been reading this discussion in one of MS's VB.NET news group. Wondered if anybody has heard about it. Here is a quote from the languages in the next few days. Windows Server SBS Discussions Andrew M. Saucci Jr (1) VB.NET (1) Money (1) Otherwise (1) Shutdown (1) Update (1) Microsoft public newsgroups (1) Microsoft (1 this, news, group. . . description: I have been reading this discussion in one of MS's VB.NET news group. Wondered if anybody has heard about it. Here is a quote from the
own adapters) ? Any reference also to the license? Much Thanks Don BizTalk Discussions BizTalk (1) VB.NET (1) WCF (1) InstallShield (1) •BizTalk (1) Preprocessors (1) •Experience (1) Biztalkien (1) Does anyone with BizTalk 2004 / 2006 •Experience developing BizTalk Application Integration Components and Custom Preprocessors •2+ years VB.NET, C# architecture, NET 2.0-3.5, XML, Web Services, WCF, and design and development