Login | |
|
 |
Rename more than 1 OU - 9/22/2008 4:33:46 AM
|
|
 |
|
| |
nik1420
Posts: 58
Score: 0
Joined: 12/19/2007
Status: offline
|
I have been assigned the task of renaming all OUs under our Workstation OU. I know how to rename 1 OU, but I'm having trouble with more than one OU under Workstation. Not to mention there are some Workstation OUs that have up to 40 OUs. To rename 1 OU I have: Set objWKS = GetObject("LDAP://OU=Workstations,OU=Site,dc=fabrika,dc=com) objWKS .Movehere _ "LDAP://OU=S/W_Dist_01,OU=Workstations,OU=Site,dc=fabrika,dc=com", "OU=SW_DIST_01" This works. To make the change to more than 1 OU under Workstations, that's were I need some help. Really all I need to do is remove the slash '/'. I'm thinking that I need to do an array, then remove the second character which would be the '/' So I have Set objWKS = GetObject("LDAP://OU=Workstations,OU=Site,dc=fabrika,dc=com) objwks.Filter = Array ("ou") For each OU in objwks strName=Replace(strName, "/", "") Next But the name of the OUs have not removed the '/'
|
|
| |
|
|
|
|
|