Sanal makina oluşturur ve siler

04/05/2012, 11:59

accessman

Kod:
'CREATE A VIRTUAL MACHINE
on error resume next

set virtMachObj = CreateObject("VirtualServer.Application")
returnVar = virtMachObj.CreateVirtualMachine( "Dev Team Virtual Machine", "C:\path\to\scripted\Virtualmachine" )

'DELETE A VIRTUAL MACHINE
on error resume next

set virtMachObj = CreateObject("VirtualServer.Application")
set myVMObj = virtMachObj.FindVirtualMachine("Dev Team Virtual Machine")

returnVar = virtMachObj.DeleteVirtualMachine(myVMObj)