Discussion:
Identify the forest root domain
(too old to reply)
John
2003-12-27 18:10:37 UTC
Permalink
Hi,

If I have an environment with 1 forest containing 3 trees how can I quickly
confirm which of the 3 tree root domains is the forest root domain, I see a
domain which is the schema and domain naming master but this could have been
transfered, I want to know a command/screen to confirm which domain is the
forest root?

Many thanks in advance,

John
Richard Mueller [MVP]
2003-12-27 18:30:37 UTC
Permalink
Post by John
If I have an environment with 1 forest containing 3 trees how can I quickly
confirm which of the 3 tree root domains is the forest root domain, I see a
domain which is the schema and domain naming master but this could have been
transfered, I want to know a command/screen to confirm which domain is the
forest root?
Hi,

A VBScript program using the ADSystemInfo object (requires W2k or above):

Set objSysInfo = CreateObject("ADSystemInfo")
Wscript.Echo "Forest DNS Name: " & objSysInfo.ForestDNSName

Or, on any client you can use the RootDSE object:

Set objRootDSE = GetObject(LDAP://RootDSE)
Wscript.Echo "Root Domain: " & objRootDSE.Get("RootDomainNamingContext")

Create a *.vbs text file with the VBScript statements. If the file is called
RootDomain.vbs, run it at a command prompt with:

cscript RootDomain.vbs
--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--
John
2003-12-28 04:59:59 UTC
Permalink
Great, appreciate your help.

Regards,

John
Post by John
Post by John
If I have an environment with 1 forest containing 3 trees how can I
quickly
Post by John
confirm which of the 3 tree root domains is the forest root domain, I
see
Post by John
a
Post by John
domain which is the schema and domain naming master but this could have
been
Post by John
transfered, I want to know a command/screen to confirm which domain is the
forest root?
Hi,
Set objSysInfo = CreateObject("ADSystemInfo")
Wscript.Echo "Forest DNS Name: " & objSysInfo.ForestDNSName
Set objRootDSE = GetObject(LDAP://RootDSE)
Wscript.Echo "Root Domain: " & objRootDSE.Get("RootDomainNamingContext")
Create a *.vbs text file with the VBScript statements. If the file is called
cscript RootDomain.vbs
--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--
Loading...