Rob414 Posted November 3, 2011 Posted November 3, 2011 Hi, I often have to copy folders to multiple PCs in labs and have created a script to read the name of the PC from a txt file, read the name of the folder from a txt file and copy out to the machines as bellow. Problem is I need it to copy out to the PCs in the txt file simultaneously. I’m copying VM’s that can be up to 25Gb in size so it’s not viable to copy out to just one machine at a time or it’ll be running all day! Is this possible?? Script I’ve got so far is: InputmachineFile = "C:\VMDEPLOYMENT SCRIPTS\machinelist.Txt" Inputvmfile = "C:\VMDEPLOYMENT SCRIPTS\vmlist.txt" strFolderroot = "\\staffclus\issimages$\VMWare\VM Labs 2011-12\C-Drive" machinecount=0 vmcount=0 Const OverwriteExisting = True Set objFSO = CreateObject("Scripting.FileSystemObject") Set objmachineFile = objFSO.OpenTextFile(InputmachineFile) Set objvmFile = objFSO.OpenTextFile(InputvmFile) Do While Not (objvmFile.AtEndOfStream) strvm = objvmFile.ReadLine strfolderName = strFolderroot & "\" & strvm Do While Not (objmachineFile.AtEndOfStream) strComputer = objmachineFile.ReadLine objFSO.Copyfolder strfolderName, "\\" & strComputer & "\C$\VMware\" strComputer = "" machinecount=machinecount+1 Loop objmachineFile.close Set objmachineFile = objFSO.OpenTextFile(InputmachineFile) vmcount=vmcount+1 strvm="" foldername="" Loop MsgBox "Done " & machinecount & " " & vmcount I’m a complete novice at this so any help would be great Rob
jamesfed Posted November 3, 2011 Posted November 3, 2011 It would hammer the computer startup times but why not do it through group policy? As a total and utter off topic alternative if you are dealing with VMs in a testing enviroment you could always get something like a HP DL385 G7 server and set it up with Hyper-V and System Centre Virtual Machine Manager with the self service portal setup for your labs users - they would then be able to setup and run their own VMs (indipendant of each other) on the Hyper-V server.
Rob414 Posted November 3, 2011 Author Posted November 3, 2011 Thanks for reply Jamesfed, but not an option i'm afraid. I already get grief about log in times as it is and it's only 4mins! lol The VMs are actually used in 60 odd student labs and just need to be copied out once, then the machine is frozen so they can be returned to original state. Cheers, Rob
jamesfed Posted November 3, 2011 Posted November 3, 2011 Thanks for reply Jamesfed, but not an option i'm afraid. I already get grief about log in times as it is and it's only 4mins! lol The VMs are actually used in 60 odd student labs and just need to be copied out once, then the machine is frozen so they can be returned to original state. Cheers, Rob I'd have a look at my 2nd option then - would be expensive but maybe something for the long run You can do some pretty impressive things in Hyper-V.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now