Move Computers Between OUs

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
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.
Locked
User avatar
ga_vbs
Posts: 5
Joined: Thu Aug 31, 2006 4:06 am

Move Computers Between OUs

Post by ga_vbs » Thu May 17, 2007 3:01 pm

Hi all,
I've been looking for a way to move computers between OUs in the same domain, and I found few scripts, but for some reason they didn't work for me.
I foun "Moving Computers from a list into an OU" at http://www.scriptinganswers.com/vault/a ... extfiletxt but I still can't get it to work.


can you guys tell me what I am doing wrong here?

I apreciate all comments
MJ

User avatar
jvierra
Posts: 12538
Joined: Tue May 22, 2007 9:57 am
Contact:

Move Computers Between OUs

Post by jvierra » Sat May 19, 2007 6:50 am

THe script runs perfesctly for me.

Are you sure you posted the correct script. This script has no line 13. Lin 13 is a comment.

User avatar
jvierra
Posts: 12538
Joined: Tue May 22, 2007 9:57 am
Contact:

Move Computers Between OUs

Post by jvierra » Sat May 19, 2007 10:39 am

Line 43
If strNTName "" Then

Miissing equal sign. This would produce the error.

User avatar
ga_vbs
Posts: 5
Joined: Thu Aug 31, 2006 4:06 am

Move Computers Between OUs

Post by ga_vbs » Sat May 19, 2007 11:39 am

I added the equal sign and I am not getting the error message any more, but the computers are not moved.

I appreciate your input

User avatar
ga_vbs
Posts: 5
Joined: Thu Aug 31, 2006 4:06 am

Move Computers Between OUs

Post by ga_vbs » Sat May 19, 2007 12:24 pm

do you mean I put it in the beginning of the script, or before each line?

Thanks

User avatar
ga_vbs
Posts: 5
Joined: Thu Aug 31, 2006 4:06 am

Move Computers Between OUs

Post by ga_vbs » Sun May 20, 2007 12:59 am

Thanks for the great advice :)

User avatar
ga_vbs
Posts: 5
Joined: Thu Aug 31, 2006 4:06 am

Move Computers Between OUs

Post by ga_vbs » Tue May 22, 2007 2:29 pm

One of my colleagues was able to fix this script and and he also did some customization that fits our environment.

Thanks to all for the helpga_vbs2007-05-29 13:45:12

Locked