Lezen in het Engels

Delen via


Msvm_VirtualSwitchManagementService class

Controls the definition, modification, and destruction of global networking resources such as virtual switches, switch ports, and internal Ethernet ports.

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

Syntax

class Msvm_VirtualSwitchManagementService : CIM_Service
{
  string   Caption = "Hyper-V Networking Management Service";
  string   Description = "Provides Hyper-V Networking WMI management";
  string   ElementName = "Hyper-V Networking Management Service";
  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   SystemCreationClassName = "Msvm_ComputerSystem";
  string   SystemName;
  string   CreationClassName = "Msvm_VirtualSwitchManagementService";
  string   Name = "nvspwmi";
  string   PrimaryOwnerName;
  string   PrimaryOwnerContact;
  string   StartMode = "Automatic";
  boolean  Started = TRUE;
};

Members

The Msvm_VirtualSwitchManagementService class has these types of members:

  • Methods
  • Properties

Methods

The Msvm_VirtualSwitchManagementService class has these methods.

Method Description
BindExternalEthernetPort

Binds an external Ethernet port to the Microsoft Windows Virtualization network subsystem. After this call is made, virtual machines can use the external Ethernet port to send data out over the physical network.

ConnectSwitchPort

Connects a switch port to a LAN endpoint. Upon success of the connection, a CIM_ActiveConnection instance will be created that associates the port with the LAN endpoint.

CreateInternalEthernetPort

Creates an internal Ethernet port with a static MAC address.

CreateInternalEthernetPortDynamicMac

Creates an internal Ethernet port with a dynamic MAC address.

CreateSwitch

Creates a new virtual switch.

CreateSwitchPort

Connects a NIC to a virtual switch port.

DeleteInternalEthernetPort

Deletes an internal Ethernet port.

DeleteSwitch

Deletes a virtual switch.

DeleteSwitchPort

Deletes a virtual switch port.

DisconnectSwitchPort

Disconnects a virtual switch port.

RequestStateChange

This method is inherited from CIM_EnabledLogicalElementand is not supported.

SetupSwitch

Sets up a switch such that the existing network architecture is maintained.

StartService

This method is inherited from CIM_Service and is not supported.

StopService

This method is inherited from CIM_Service and is not supported.

TeardownSwitch

Deletes the internal port for a switch and unbinds the external adapter.

UnbindExternalEthernetPort

Unbinds an external Ethernet port to the Microsoft Windows Virtualization network subsystem. After this call is made, virtual machines cannot use the external Ethernet port to send data out over the physical network.

 

Properties

The Msvm_VirtualSwitchManagementService 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_ManagedSystemElement and is always set to "Hyper-V Networking Management Service".

CreationClassName

Data type: string

Access type: Read-only

The name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified. This property is inherited from CIM_Service and is always set to "Msvm_VirtualSwitchManagementService".

Description

Data type: string

Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedSystemElement and is always set to "Provides Hyper-V Networking WMI management".

ElementName

Data type: string

Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedSystemElement and is always set to "Hyper-V Networking Management Service".

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).

InstallDate

Data type: datetime

Access type: Read-only

The date and time the object was installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement and is not used.

Name

Data type: string

Access type: Read-only

The label by which the object is known. When subclassed, this property can be overridden to be a key property. This property is inherited from CIM_Service and is always set to "nvspwmi".

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).

OtherEnabledState

Data type: string

Access type: Read-only

The enabled or disabled state of the element when the enabled state property is set to 1 ("Other"). This property is inherited from CIM_EnabledLogicalElement and 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_Service 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_Service 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).

Started

Data type: boolean

Access type: Read-only

Indicates whether the service has been started (TRUE), or stopped (FALSE). This property is inherited from CIM_Service and is always set to TRUE.

StartMode

Data type: string

Access type: Read-only

Indicates whether the service is automatically started by a system, an operating system, and so on, or is started only upon request. This property is inherited from CIM_Service and is always set to "Automatic".

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 each array element is always set to "OK".

SystemCreationClassName

Data type: string

Access type: Read-only

The creation class name of the scoping system. This property is inherited from CIM_Service and is always set to "Msvm_ComputerSystem".

SystemName

Data type: string

Access type: Read-only

The NetBIOS name of the hosting computer system. This property is inherited from CIM_Service.

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_VirtualSwitchManagementService 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_Service

Networking Classes