Page 1 of 1 1
Topic Options
#8240 - 2001-04-23 10:29 PM domain controller enumeration
Anonymous
Unregistered


I need some help with a script. I need to be able to find out the domain controllers for a given domain.

The reason I need to do this is - I need to run some login scripts for some users that aren't really logged on. It's a RAS thing. So, the users don't logon via the netlogon service. I would like to be able figure out the dc's and then run their script from one of those dc's. I replicate the scripts to all of the dc's. Anybody got any suggestions.
Thanks,
Jim

Top
#8241 - 2001-04-24 01:57 AM Re: domain controller enumeration
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Jimbo -
Key is HKEY_LOCAL_MACHINE\System\ControlSet<0x>\Control\ProductOptions

Values in ProductType:
LANMANNT = Domain Controller
SERVERNT = Member server

Check HKLM\System\Select to determine which is the current ControlSet 9numeric value 0-2 normally).

You could also use the NT 4.0 ResKit utility 'netdom'. Run, for example, 'netdom query /domain:<my domain> pdc' and it will return the PDC. Substitute 'DC' for 'PDC' and it will return all DC's. Additionally, can use remotely against domains you have trust relationships with to see their DC's, member servers etc [netdom query /domain:<trusted domain> dc].

Bill

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1119 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.052 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org