Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

renaming computer in Active Directory; getting error 1

Status
Not open for further replies.

Techie64

Technical User
Mar 22, 2005
29
US
OK. The script does work. I checked the renamed computer in Active Directory. But how do I stop the error from generating?

Set objOU = GetObject("LDAP://OU=Compute,DC=Site,DC=Com")
intReturn = objOU.MoveHere _
("LDAP://CN=Computer1,OU=Compute,DC=Site,DC=Com", "cn=Computer2")

Line: 3
Char: 1
Error: Wrong number of arguments or invalid property assignment: 'intReturn'
Code: 800A01C2
Source: Microsoft VBScript runtime error
 
Try changing the code to:

Set intReturn = objOU.MoveHere _
("LDAP://CN=Computer1,OU=Compute,DC=Site,DC=Com", "cn=Computer2")

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top