IVMVirtualMachine::AutoStartAtLaunch property
The AutoStartAtLaunch property contains whether this virtual machine will start up automatically when Virtual Server is launched.
This property is read/write.
Syntax
HRESULT put_AutoStartAtLaunch(
[in] VMAutoStartType autoStartAtLaunch
);
HRESULT get_AutoStartAtLaunch(
[out] VMAutoStartType *autoStartAtLaunch
);
VB |
---|
|
Property value
Contains a flag indicating whether this virtual machine will start up automatically when Virtual Server is launched.
This property value is read/write.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
The autoStartAtLaunch parameter is NULL. |
|
The autoStartAtLaunch parameter is not valid. |
|
The RunAsDefinedAccount property must be set to TRUE in order to enable AutoStart. |
|
The configuration is unknown. |
|
An unexpected error has occurred. |
Remarks
By default, a virtual machine will start up automatically if it was running when Virtual Server was quit.
Examples
The following example displays the AutoStartAtLaunch property value of a IVMVirtualMachine object.
Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")
Wscript.Echo "VM Name: " & objVM.Name
WScript.Echo "Autostart at launch: " & objVM.AutoStartAtLaunch
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|