Question Locked

Active Directory property "DefaultNamingContext" giving error

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have written a very simple code in VBA which is creating an Active Directory Account by picking the information from the Excel worksheet. The actual code is as follows:

Set rootDSE = GetObject("LDAP://Great")

DomainContainer = "LDAP://" & rootDSE.Get("defaultNamingContext")

It's giving me an error at the second line and the error is "The directory property cannot be found in the cache". The account I am logged in as in the development machine is a member of the domain admins.

Any one has any idea what might be the problem?

much appreciated.

2 replies

This discussion is closed to new replies.