How to deal with the embedded OU in script

  • Thread starter Thread starter Victor
  • Start date Start date
V

Victor

In MS scripting guide you will see the similar sample like:
'''''
Set objOU = GetObject("LDAP://OU=HR,dc=fabrikam,dc=com")
Set objGroup = objOU.Create("Group", "cn=atl-users")
objGroup.Put "sAMAccountName", "atl-users"
objGroup.SetInfo
'''''
But if I have a multiple level such
as ./BranchOU/DeptOU/SampleUser, then how can I express
it? Like this:
Set objOU = GetObject
("LDAP://OU=BranchOU,OU=DeptOU,dc=sample,dc=com")
But system all report error when executing.
Anybody can help? Tks.
 
That looks right. I use VB 6.0 for my Active Directory
programs so I will probably not be able to help you
further.
 
Back
Top