How to deal with the embedded OU in script

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.
 
M

Martin

That looks right. I use VB 6.0 for my Active Directory
programs so I will probably not be able to help you
further.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top