While M. Night Shyamalan (http://www.imdb.com/name/nm0796117/) is trying to sell some tickets for his new (below the average) movie The Happening (http://www.imdb.com/title/tt0949731/), I had the opportunity to help some AD admins reporting their questions in newsgroups.
A recurring one is “how can I know to which DC my users are going to authenticate”? Well, there are multiples solutions, it all depends on how you want to do and how much effort you want to invest…
For example, you can use the NLTEST command from the windows Resource Kit Tools: NLTEST /server:MYCLIENTCOMPUTER /dsgetdc:MYDOMAINDNSNAME will report to which DC a user belonging to the domain MYDOMAINDNSNAME if logged on the computer named MYCLIENTCOMPUTER
Another simple method, provided by the talented MVP Gilles Laurent (http://glsft.free.fr), is to create or modify your common logon script in batch with a line such as:echo %date:~-10%
%time:~-11,8%,%computername%,%logonserver:~2%>>\\server\share\LogonUsers.log and to create a share on a server where all user have permission to write.
Finally, there is the LogParser way. Assuming successful logon events are audited on all your DC’s, you can download and run the following scripts against all you DC’s (as long as you have the appropriate privileges): http://www.marc-antho-etc.net/scriptdetail.aspx?script=adSuccessNetLogons.cmd.txt and http://www.marc-antho-etc.net/scriptdetail.aspx?script=adSuccessNetLogons.lpq.txt. These will create a CSV file with the following fields: DC,Date-Time,Domain,User,Authentication,ClientName and ClientIP
It also takes care of not including anonymous logons. But be aware that this may turn to be a slow process across WAN’s…
Once you have the CSV in hand, you can look for the mapping between a DC and the client IP or the client Name or even run additional data extraction query such as:Returning the number of logons per authentication provider (NTLM, Kerberos…): http://www.marc-antho-etc.net/scriptdetail.aspx?script=adSuccessInteractLogonsByAuth.lpq.txt... And many more you’ll find in the AD section of the Scripting and Automation Area: http://www.marc-antho-etc.net/scripts.aspx?prodtech=AD
Now let’s hope you’ll find better twists in your AD than in The Happening.
And Cut!