IVMVirtualMachine::ChassisSerialNumber property
The ChassisSerialNumber property contains the chassis serial number.
This property is read/write.
Syntax
HRESULT put_ChassisSerialNumber(
[in] BSTR chassisSerialNumber
);
HRESULT get_ChassisSerialNumber(
[out] BSTR *chassisSerialNumber
);
VB |
---|
|
Property value
The chassis serial number.
This property value is read/write.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
The chassisSerialNumber parameter is NULL. |
|
The chassisSerialNumber parameter is greater than 32 characters, an empty string, or not valid. |
|
The serial number cannot be set while the virtual machine is running. |
|
The configuration is unknown. |
|
An unexpected error has occurred. |
Remarks
This property will not contain valid information until after the virtual machine has started up for the first time. An empty string will be returned if it is read before the initial startup.
Examples
The following example displays the ChassisSerialNumber property value of a VMVirtualMachine object.
Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")
Wscript.Echo "VM Name: " & objVM.Name
If objVM.ChassisSerialNumber = "" Then
WScript.Echo "Chassis serial number: [null]"
Else
WScript.Echo "Chassis serial number: " & objVM.ChassisSerialNumber
End If
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|