VBScript- Move List of Computers to OU Within another OU
Posted on 2016-09-09
I am working on a script to move computers found in Active Directory to a Disabled Computers OU. The issue I am encountering is that each location has its own OU and the computers must be moved to the Disabled Computers for each location not just a general Disabled Computers OU. For example If a Location is Here then Under Here is the Disabled Computers OU. I am not sure what the proper syntax would be when setting the destination in the script.
I have tried several variations of the following
strNewOU = "LDAP://OU=Here\Disabled Computers," & strDNSDomain
strNewOU = "LDAP://OU=Here\" & """" & "Disabled Computers" & """" & "," & strDNSDomain
strNewOU = "LDAP://OU=Here\Disabled Computers" & strDNSDomain
None of these have worked. Any assistance would be appreciated.