How to find an Active Directory forest?
I have not found any good ways to determine what forest a domain is part of. By default the first domain you created becomes the root of the forest, but often you need to know for sure wha the forest is, even if the name is not often used.
On Windows 2008 R2 I can open the Active Directory Domains and Trusts application and right-click the top node – there I can choose to change forest. And then display the name of the forest I am part of.
But if you do not have a Windows 2008 R2 server, you need to so some scripting. Save the lines below to a file called getroot.vbs and execute the file.
Set o = CreateObject("ADSystemInfo")
Wscript.Echo "Forest DNS Name: " & o.ForestDNSName
Labels: Windows


1 Comments:
Thanks for posting that little gem! That's just what I needed!
See Ya!
Van
Post a Comment
Links to this post:
Create a Link
<< Home