Alcuni script in Visual Basic Script (VBS) per controllare le macchine virtuali su Microsoft Virtual Server 2005

Per avviare la VM:

VBScript: start.vbs

On Error Resume Next
dim vm
'the name of VM to start
vm = "VM_W2K3_WSS3"
Set oVS = CreateObject("VirtualServer.Application")
Set oVM = oVS.FindVirtualMachine(vm)
oVM.Startup()

Per fare lo shutdown della VM;

VBScript: shutdown.vbs

On Error Resume Next
dim vm
'the name of VM to shutdown
vm = "VM_W2K3_WSS3"
Set oVS = CreateObject("VirtualServer.Application")
Set oVM = oVS.FindVirtualMachine(vm)
Set oOS = oVM.GuestOS
oOS.Shutdown()
Tags:
Script85 VBScript11 Virtualization4
Potrebbe interessarti anche: