Share via


IVMVirtualMachine::BaseBoardSerialNumber property

The BaseBoardSerialNumber property contains the base board serial number.

This property is read/write.

Syntax

HRESULT put_BaseBoardSerialNumber(
  [in]  BSTR baseBoardSerialNumber
);

HRESULT get_BaseBoardSerialNumber(
  [out] BSTR *baseBoardSerialNumber
);

VB
VMVirtualMachine.BaseBoardSerialNumber( _
  ByRef baseBoardSerialNumber, _
  ByVal baseBoardSerialNumber _
)

Property value

The base board serial number.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The baseBoardSerialNumber parameter is NULL.
E_INVALIDARG
The baseBoardSerialNumber parameter is greater than 32 characters, an empty string, or not valid.
VM_E_VM_RUNNING
The serial number cannot be set while the virtual machine is running.
VM_E_VM_UNKNOWN
The configuration is unknown.
DISP_E_EXCEPTION
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 BaseBoardSerialNumber property value of a IVMVirtualMachine object.

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")

Wscript.Echo "VM Name: " & objVM.Name

If objVM.BaseBoardSerialNumber = "" Then
  Wscript.Echo "Baseboard serial number: [null]"
Else
  WScript.Echo "Baseboard serial number: " & objVM.BaseBoardSerialNumber
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
VsComInterfaces.h

See also

IVMVirtualMachine