Newsgroups: microsoft.public.scripting.vbscript
From: Rob <R...@discussions.microsoft.com>
Date: Fri, 5 Jan 2007 05:13:01 -0800
Local: Fri, Jan 5 2007 1:13 pm
Subject: help needed moving mulitple computer accounts
Hi,
first off let me say I'm a total novice and am looking for a decent book - any recommendations? I'm considering the following: 1) AD Cookbook - Robbie ALlen 2) AD 3rd Ed - Joe Richards 3) AD - Robbie Allen/ Alistair Lowe-Norris May not be the right newsgroup for this tho.. So, to my question... On Error Resume Next Const ADS_SCOPE_SUBTREE = 2 objOU = GetObject("LDAP://ou=Redundant Objects,ou=Redundant Computer Set objConnection = CreateObject("ADODB.Connection") objCommand.Properties("Page Size") = 1000 objCommand.CommandText = _ objRecordSet.MoveFirst Do Until objRecordSet.EOF >>finish http://www.microsoft.com/technet/scriptcenter/resources/qanda/jun06/h... (I've changed computername and domainname) Now this is supposed to move a comp account from an unknown OU to known OU however I tested this with one computer account and it didn't work. I then found this post which details writing a batch file and using an input 1 input.txt computer_name_1 2 the batch file @echo off echo **************************************** for /F %%1 in (input.txt) do ( 3 the VBS move_cmp.vbs FILE dim nomepc Const ADS_PROPERTY_APPEND = 3 '************************************************************************** *** Set objNewOU = GetObject("LDAP://"& strFissa) Sub ParseCommandLine() set vArgs = WScript.Arguments if vArgs.Count <> 1 then I've not changed any of the variables here but this script only looks in the You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||