towo2002
asked on
How to move the user accounts from one OU to another OU by VBScript?
Dear all experts,
I would like to implement a VBScript program which is used to move some user / computer accounts from one OU to another, please kindly give me some advise about it.
Regards,
I would like to implement a VBScript program which is used to move some user / computer accounts from one OU to another, please kindly give me some advise about it.
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When I have that type of task I like to use dsmove - I just find it cleaner, I run csvde or dumps with vbscript before and after to check that all went well.
dsmove, dsquery, dsadd, etc all part of Windows 2003.
the script center at Microsoft website gives a very basic vbscript for move user:
http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/manage/default.mspx
Set objOU = GetObject("LDAP://ou=sales
objOU.MoveHere _
"LDAP://cn=BarrAdam,OU=hr,
Mark