query on DC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how to identify a domain controller through its registry keys ?
Is there any specific keys which stores this information
 
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
 
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
 
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
 
Back
Top