query on DC

G

Guest

how to identify a domain controller through its registry keys ?
Is there any specific keys which stores this information
 
J

Jerold Schulman

how to identify a domain controller through its registry keys ?
Is there any specific keys which stores this information

I am not aware of any, but:

set dc=N
for /f "Tokens=*" %a in ('netdom query dc^|Find /I "%ComputerName%"') do set dc=Y

or
set dc=N
for /f "Tokens=*" %a in ('DSQUERY SERVER -O RDN^|Find /I "%ComputerName%"') do set dc=Y

See tip 8241 and links in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
W

Wayne Tilton

I am not aware of any, but:

set dc=N
for /f "Tokens=*" %a in ('netdom query dc^|Find /I "%ComputerName%"')
do set dc=Y

or
set dc=N
for /f "Tokens=*" %a in ('DSQUERY SERVER -O RDN^|Find /I
"%ComputerName%"') do set dc=Y

See tip 8241 and links in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com

Actually, you CAN identify a DC via the registry.

HKLM/System/CurrentControlSet/Control/ProductOptions/ProductType

will be: ServerNT for a member server and LanmanNT for a DC

HTH,

Wayne Tilton
 
G

Guest

Thank you for the information.

Wayne Tilton said:
Actually, you CAN identify a DC via the registry.

HKLM/System/CurrentControlSet/Control/ProductOptions/ProductType

will be: ServerNT for a member server and LanmanNT for a DC

HTH,

Wayne Tilton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top