Set-SCLogicalSwitchVirtualNetworkAdapter

Commits any changes in settings to an existing virtual network adapter (VNIC) that is connected to a logical switch.

Syntax

Set-SCLogicalSwitchVirtualNetworkAdapter
 [-LogicalSwitchVirtualNetworkAdapter] <LogicalSwitchVirtualNetworkAdapter> [-Description <String>]
 [-EthernetAddressType <EthernetAddressType>] [-IPv4AddressPool <StaticIPAddressPool>]
 [-IPv4AddressType <EthernetAddressType>] [-IPv6AddressPool <StaticIPAddressPool>]
 [-IPv6AddressType <EthernetAddressType>] [-InheritsAddressFromPhysicalNetworkAdapter <Boolean>]
 [-IsUsedForHostManagement <Boolean>] [-JobVariable <String>] [-Name <String>] [-PROTipID <Guid>]
 [-PortClassification <PortClassification>] [-RemoveIPv4AddressPool] [-RemoveIPv6AddressPool]
 [-RemovePortClassification] [-RemoveVMNetwork] [-RemoveVMSubnet] [-RunAsynchronously] [-VLanEnabled <Boolean>]
 [-VLanID <UInt16>] [-VMMServer <ServerConnection>] [-VMNetwork <VMNetwork>] [-VMSubnet <VMSubnet>]
 [<CommonParameters>]

Description

The Set-SCLogicalSwitchVirtualNetworkAdapter cmdlet commits changes made to an existing virtual network adapter that was added to the Uplink Port Profile as part of the logical switch definition.

Examples

Example 1: Rename a logical switch virtual network adapter

PS C:\> $HostVNic= Get-SCLogicalSwitchVirtualNetworkAdapter -Name "LogSw01_hostMgmt"
PS C:\> Set-SCLogicalSwitchVirtualNetworkAdapter -LogicalSwitchVirtualNetworkAdapter $HostVNic -Name "LogSw01_cluster"

The first command gets a logical switch virtual network adapter by using the Get-SCLogicalSwitchVirtualNetworkAdapter cmdlet, and then stores it in the $HostVNic variable.

The second command renames the adapter in $HostVNic.

Parameters

-Description

Specifies a description for the virtual network adapter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EthernetAddressType

Specifies an Ethernet address type. The acceptable values for this parameter are:

- Dynamic

  • Static

Type:EthernetAddressType
Parameter Sets:Dynamic, Static
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4AddressPool

Specifies a static address pool that contains IPv4 addresses.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4AddressType

Specifies an IPv4 address type. The acceptable values for this parameter are:

- Dynamic

  • Static

Type:EthernetAddressType
Parameter Sets:Dynamic, Static
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6AddressPool

Specifies a static address pool that contains IPv6 addresses.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6AddressType

Specifies an IPv6 address type. The acceptable values for this parameter are:

- Dynamic

  • Static

Type:EthernetAddressType
Parameter Sets:Dynamic, Static
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InheritsAddressFromPhysicalNetworkAdapter

Indicates whether the network adapter inherits its address from a physical network adapter.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsUsedForHostManagement

Indicates whether the virtual network adapter is used for host management.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalSwitchVirtualNetworkAdapter

Specifies a logical switch virtual network adapter object.

Type:LogicalSwitchVirtualNetworkAdapter
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the network adapter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PortClassification

Specifies the port classification of the switch to which the virtual network adapter connects.

Type:PortClassification
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RemoveIPv4AddressPool

Indicates that this cmdlet removes an IPv4 address pool.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveIPv6AddressPool

Indicates that this cmdlet removes an IPv6 address pool.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemovePortClassification

Indicates that this cmdlet removes a port classification.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveVMNetwork

Indicates that this cmdlet removes a virtual machine network.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveVMSubnet

Indicates that this cmdlet removes a virtual machine subnet.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VLanEnabled

Indicates whether to enable a virtual LAN (VLAN) for use by virtual machines on a Hyper-V or Citrix XenServer host.

- Example format for a single VLAN: -VLANEnabled -VLANMode "Access" -VLANID 35

  • Example format for multiple VLANs: -VLANEnabled -VLANMode "Trunk" -VLANTrunkID 1,2,100,200,1124

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VLanID

Assigns a numerical identifier in the range 1-4094 to a virtual network adapter on a virtual machine or to a physical network adapter on a virtual machine host.

Configure a VLanID on a Hyper-V, VMware ESX, or Citrix XenServer host on an externally bound physical network adapter when the VLan mode is Access.

Configure a VLanID on a virtual network adapter of a virtual machine bound to a physical network adapter on the host, or bound to an internal virtual network on the host.

Example format: -VLanEnabled -VLanMode "Access" -VLANID 35

Type:UInt16
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMNetwork

Specifies a VM network object.

Type:VMNetwork
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMSubnet

Specifies a virtual machine subnet object.

To obtain a VMSubnet object, use the Get-SCVMSubnet cmdlet.

Type:VMSubnet
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False