hi all,
I have found this script and it works - moving users from one OU to another OU.
Question = how can I modify it to only move users who have attribute "company=2" only. Thank you apprepricate the help as I'm new to scripting.
**************Set objNewOU = GetObject("LDAP://ou=qdobaemp,ou=users,ou=managed objects,dc=testcorp,dc=testjack,dc=net")Set objOldOU = GetObject("LDAP://ou=clan,ou=users,ou=managed objects,dc=testcorp,dc=test,dc=net")
objOldOU.Filter = Array("user")
For Each objUser in objOldOU objNewOU.MoveHere objUser.ADsPath, vbNullString Next
end if
move user based on Attribute - help
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
move user based on Attribute - help
hi all,
I have found this script and it works - moving users from one OU to another OU.
Question = how can I modify it to only move users who have attribute "company=2" only. Thank you apprepricate the help as I'm new to scripting.
**************Set objNewOU = GetObject("LDAP://ou=qdobaemp,ou=users,ou=managed objects,dc=testcorp,dc=testjack,dc=net")Set objOldOU = GetObject("LDAP://ou=clan,ou=users,ou=managed objects,dc=testcorp,dc=test,dc=net")
objOldOU.Filter = Array("user")
For Each objUser in objOldOU objNewOU.MoveHere objUser.ADsPath, vbNullString Next
end if
I have found this script and it works - moving users from one OU to another OU.
Question = how can I modify it to only move users who have attribute "company=2" only. Thank you apprepricate the help as I'm new to scripting.
**************Set objNewOU = GetObject("LDAP://ou=qdobaemp,ou=users,ou=managed objects,dc=testcorp,dc=testjack,dc=net")Set objOldOU = GetObject("LDAP://ou=clan,ou=users,ou=managed objects,dc=testcorp,dc=test,dc=net")
objOldOU.Filter = Array("user")
For Each objUser in objOldOU objNewOU.MoveHere objUser.ADsPath, vbNullString Next
end if