Hello,
I'm new to vbscript and am trying to figure out how to write a vbscript that will: move all computers in the computer container beginning with CSC to a specific OU named Corp-SD.
I'm using a basic script Microsoft put out:
Set objNewOU = GetObject("LDAP://OU=CORP-SD, OU=Workstations, OU=Managed Objects, dc=corp, DC=jitb, DC=net")
Set objMoveComputer = objNewOU.MoveHere _
("LDAP://CN=CSCT1*, CN=Computers, dc=corp, DC=jitb, DC=net", _
"CN=CSCT1*")
This script works fine as long as your specify the computer name. All computers that belong in the CORP-SD OU start with CSC so I wanted to do something like CSC* but it didn't work. Any Ideas???
Thx!
I'm new to vbscript and am trying to figure out how to write a vbscript that will: move all computers in the computer container beginning with CSC to a specific OU named Corp-SD.
I'm using a basic script Microsoft put out:
Set objNewOU = GetObject("LDAP://OU=CORP-SD, OU=Workstations, OU=Managed Objects, dc=corp, DC=jitb, DC=net")
Set objMoveComputer = objNewOU.MoveHere _
("LDAP://CN=CSCT1*, CN=Computers, dc=corp, DC=jitb, DC=net", _
"CN=CSCT1*")
This script works fine as long as your specify the computer name. All computers that belong in the CORP-SD OU start with CSC so I wanted to do something like CSC* but it didn't work. Any Ideas???
Thx!