Yes you can. The user who is logged in on the client must be a member of the Domain Administrators or Enterprise Administrators group. The code below was used.
Set objdomain = GetObject("LDAP://DC=fourthcoffee,dc=com")
Set objou = objDomain.Create("OrganizationalUnit", "ou=HR")
ObjOU.SetInfo
To get this code to work in your environment, change line 1 after the LDAP:// statement to reflect your domain.
Set objdomain = GetObject("LDAP://DC=fourthcoffee,dc=com")
Set objou = objDomain.Create("OrganizationalUnit", "ou=HR")
ObjOU.SetInfo
To get this code to work in your environment, change line 1 after the LDAP:// statement to reflect your domain.
Comments