|
-
May 26th, 2012, 04:44 PM
#1
Thread Starter
New Member
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")
-
May 26th, 2012, 09:42 PM
#2
Thread Starter
New Member
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
-
May 26th, 2012, 09:48 PM
#3
Thread Starter
New Member
Re: Help with vbscript syntax???
I think I figured it out. Adding () around the statement corrects the error.
("LDAP://CN=" & strComputer & "," & strMigrationOU & "," & "CN=" & strComputer)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|