Export (0) Print
Expand All

Msvm_VirtualSwitch class

Hyper-V

Represents a virtual switch. Each switch has many different ports to which network adapters can be attached. The switch itself is not highly configurable and acts mostly as a placeholder.

The following syntax is simplified Managed Object Format (MOF) code, and it includes all of the inherited properties.

Syntax

class Msvm_VirtualSwitch : CIM_ComputerSystem
{
  string   Caption = "Virtual Switch";
  string   Description;
  string   ElementName;
  datetime InstallDate;
  uint16   OperationalStatus[] = { 2 };
  string   StatusDescriptions[] = { "OK" };
  string   Status;
  uint16   HealthState = 5;
  uint16   EnabledState = 5;
  string   OtherEnabledState;
  uint16   RequestedState = 12;
  uint16   EnabledDefault = 2;
  datetime TimeOfLastStateChange;
  string   CreationClassName = "Msvm_VirtualSwitch";
  string   Name;
  string   PrimaryOwnerContact;
  string   PrimaryOwnerName;
  string   Roles[];
  string   NameFormat;
  string   OtherIdentifyingInfo[];
  string   IdentifyingDescriptions[];
  uint16   Dedicated[] = { 0 };
  string   OtherDedicatedDescriptions[];
  uint16   ResetCapability = 5;
  uint16   PowerManagementCapabilities[];
  string   ScopeOfResidence;
  uint32   NumLearnableAddresses;
  uint32   MaxVMQOffloads;
  uint32   MaxChimneyOffloads;
};

Members

The Msvm_VirtualSwitch class has these types of members:

Methods

The Msvm_VirtualSwitch class has these methods.

MethodDescription
RequestStateChange

This method is not supported.

SetPowerState

This method is not supported.

 

Properties

The Msvm_VirtualSwitch class has these properties.

Caption
Data type: string
Access type: Read-only

A short textual description (one- line string) of the object. This property is inherited from CIM_ManagedElement and is always set to "Virtual Switch".

CreationClassName
Data type: string
Access type: Read-only

The name of the class or the subclass that is used in the creation of an instance. This property is inherited from CIM_System and is always set to "Msvm_VirtualSwitch".

Dedicated
Data type: uint16 array
Access type: Read-only

Indicates whether the computer system is a special-purpose system (dedicated to a particular use), versus being a general-purpose system. This property is inherited from CIM_ComputerSystem and it is set to 0 (Not Dedicated).

Description
Data type: string
Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedElement.

ElementName
Data type: string
Access type: Read/write

A user-friendly name for the object. This property is inherited from CIM_ManagedElement.

EnabledDefault
Data type: uint16
Access type: Read-only

An administrator's default or startup configuration for the enabled state of an element. This property is inherited from CIM_EnabledLogicalElement and is always set to 2 (Enabled).

EnabledState
Data type: uint16
Access type: Read-only

The enabled and disabled states of this element. This property is inherited from CIM_EnabledLogicalElement and is always set to 5 (Not Applicable).

HealthState
Data type: uint16
Access type: Read-only

The current health of the element. This property is inherited from CIM_ManagedSystemElement and is always set to 5 (OK).

IdentifyingDescriptions
Data type: string array
Access type: Read-only

This property is inherited from CIM_ComputerSystem and it is set to NULL.

InstallDate
Data type: datetime
Access type: Read-only

A datetime value that indicates when the object was installed. This property is inherited from CIM_ManagedSystemElement.

MaxChimneyOffloads
Data type: uint32
Access type: Read-only

The maximum number of Chimney offloads allowed for a port on this switch.

Windows Server 2008:  The MaxChimneyOffloads property is not supported until Windows Server 2008 R2.

MaxVMQOffloads
Data type: uint32
Access type: Read-only

The maximum number of VM queue (VMQ) offloads allowed for a port on this switch.

Windows Server 2008:  The MaxVMQOffloads property is not supported until Windows Server 2008 R2.

Name
Data type: string
Access type: Read-only

A name that uniquely identifies the service and provides an indication of the functionality that is managed. This property is inherited from CIM_System.

NameFormat
Data type: string
Access type: Read-only

A string that identifies how the system name was generated, using the subclass heuristic. This property is inherited from CIM_ComputerSystem and it is set to NULL.

NumLearnableAddresses
Data type: uint32
Access type: Read-only

The number of learnable addresses for this switch.

OperationalStatus
Data type: uint16 array
Access type: Read-only

The current status of the element. This property is inherited from CIM_ManagedSystemElement and is always set to 2 (OK).

OtherDedicatedDescriptions
Data type: string array
Access type: Read-only

A string that describes how or why the system is dedicated when the Dedicated array includes the value 2 (Other). This property is inherited from CIM_ComputerSystem and it is set to NULL.

OtherEnabledState
Data type: string
Access type: Read-only

The enabled or disabled state of the element when the EnabledState property is set to 1 (Other). This property is inherited from CIM_EnabledLogicalElement and is not used.

OtherIdentifyingInfo
Data type: string array
Access type: Read-only

This property is inherited from CIM_ComputerSystem and it is set to NULL.

PowerManagementCapabilities
Data type: uint16 array
Access type: Read-only

This property is inherited from CIM_ComputerSystem but it is not used.

PrimaryOwnerContact
Data type: string
Access type: Read-only

A string that provides information on how the primary owner of the service can be reached. This property is inherited from CIM_System and is not used.

PrimaryOwnerName
Data type: string
Access type: Read-only

The name of the primary owner for the service, if one is defined. This property is inherited from CIM_System and is not used.

RequestedState
Data type: uint16
Access type: Read-only

The last requested or desired state for the management service. This property is inherited from CIM_EnabledLogicalElement and is always set to 12 (Not Applicable).

ResetCapability
Data type: uint16
Access type: Read-only

This property is inherited from CIM_ComputerSystem and it is set to 5 (Not Implemented).

Roles
Data type: string array
Access type: Read-only

An array of strings that describe the roles the system plays in the information technology environment. This property is inherited from CIM_System and it is set to NULL.

ScopeOfResidence
Data type: string
Access type: Read/write

The authorization manager scope for the switch service.

Status
Data type: string
Access type: Read-only

This property is inherited from CIM_ManagedSystemElement but it is not used.

StatusDescriptions
Data type: string array
Access type: Read-only

Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement and is always set to "OK".

TimeOfLastStateChange
Data type: datetime
Access type: Read-only

The date or time when the enabled state of the element last changed. This property is inherited from CIM_EnabledLogicalElement and is not used.

Remarks

Access to the Msvm_VirtualSwitch class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.

Examples

See Querying Networking Objects.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

End of client support

None supported

End of server support

Windows Server 2012

Namespace

\\.\Root\Virtualization

MOF

WindowsVirtualization.mof

See also

CIM_ComputerSystem
Networking Classes

 

 

Community Additions

ADD
Show:
© 2014 Microsoft