Help with vbscript syntax???
I need help with the right syntax. I am trying to populate the LDAP line with the value of
strComputer, but I can't get the right syntax. Can anyone help? See my code below.
strComputer='someone'
Set objNewOU = GetObject("LDAP://OU=Computers,OU=a state,DC=anyplace,DC=com")
Set objMoveComputer = objNewOU.MoveHere _
("LDAP://CN=strComputer,CN=Computers,DC=anyplace,DC=com", "CN=strComputer")
Re: Help with vbscript syntax???
I'm new to this. Trying a different syntax still results in a 'expected end of statement error' on the last line.
strComputer="someone"
strMigrationOU="CN=Computers,DC=anyplace,DC=com"
Set objNewOU = GetObject("LDAP://OU=Computers,DC=anyplace,DC=com")
Set objMoveComputer = objNewOU.MoveHere _
"LDAP://CN=" & strComputer & "," & strMigrationOU & "," & "CN=" & strComputer
Re: Help with vbscript syntax???
I think I figured it out. Adding () around the statement corrects the error.
("LDAP://CN=" & strComputer & "," & strMigrationOU & "," & "CN=" & strComputer)