moving computers into varible OU's
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.
moving computers into varible OU's
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 and/or all computers beginning wth DAL to the DAL-SD OU.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=CSC*, CN=Computers, dc=corp, DC=jitb, DC=net", _ "CN=CSC*")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!
moving computers into varible OU's
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 and/or all computers beginning wth DAL to the DAL-SD OU.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=CSC*, CN=Computers, dc=corp, DC=jitb, DC=net", _ "CN=CSC*")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!