Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifying a server in place of ROOTDSE

Status
Not open for further replies.

swlymer

Programmer
Dec 15, 2004
10
US
Hello,

How do I sepcify a physical server in place of rootdes??

If I replace Set rootdse = GetObject("LDAP://rootdse") with Set rootdse = GetObject("LDAP://CN=SERVERNAME,OU=Domain Controllers,DC=XXX,DC=XXX,DC=XXX,DC=com")

I get an error on
domainContainer = rootdse.Get("defaultNamingContext")

telling me the property does not exist in the directory cace.

Can I not specify the rootdes??

Thansk!!

Scot Lymer
 
If I replace Set rootdse = GetObject("LDAP://rootdse") with Set rootdse = GetObject("LDAP://CN=SERVERNAME,OU=Domain Controllers,DC=XXX,DC=XXX,DC=XXX,DC=com")

I get an error on
domainContainer = rootdse.Get("defaultNamingContext")

You cannot return the default naming context from a computer object.

By doing the replace you have specified you are binding to a computer object and just calling it rootdse. Default naming context is not a property of a computer object.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top