Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The RelativeWeight property contains the relative weight assigned to this virtual machine.
This property is read-only.
Syntax
HRESULT get_RelativeWeight(
[out] long *relativeWeight
);
VB |
---|
|
Property value
Retrieves the relative weight assigned to this virtual machine. This is a number between 1 and 10000 representing priority of this virtual machine relative to other virtual machines. A higher number indicates a higher priority.
This property value is read-only.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
relativeWeight is NULL. |
|
Unknown virtual machine. |
|
An unexpected error occurred. |
Examples
The following example prints the RelativeWeight property information for each virtual machine.
Set objVS = CreateObject("VirtualServer.Application")
set colVMs = objVS.VirtualMachines
For Each objVM in colVMS
Set colAccountants = objVM.Accountant
Wscript.Echo "Virtual machine: " & objVM.Name
Wscript.Echo "Relative weight: " & colAccountants.RelativeWeight
Wscript.Echo
Next
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|