Tuesday, June 26, 2007

ScriptCenter Published Script

A couple months ago my Script written in VBScript was published to the community submitted scripts forum on Microsoft's Script center... heres the link and the original code!
http://www.microsoft.com/technet/scriptcenter/csc/scripts/servers/virtual/cscsv079.mspx?pf=true

The Reason for creating this script was to release the Virtual ASR floppies, robocopy them to a secure area, and then reattach them to their original virtual machine.
Set objVS = CreateObject("VirtualServer.Application")
Set colVMs = objVS.VirtualMachines

For Each objVM in colVMS
Set colFloppyDrives = objVM.FloppyDrives
For Each objDrive in colFloppyDrives
fdImage = "D:\VirtualServers\VirtualFloppies\" & objvm & ".vfd"
objDrive.AttachImage(fdImage)
Next
Next

No comments: