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>
[-EthernetAddressType <EthernetAddressType>]
[-IPv4AddressType <EthernetAddressType>]
[-IPv6AddressType <EthernetAddressType>]
[-VMNetwork <VMNetwork>]
[-VMSubnet <VMSubnet>]
[-PortClassification <PortClassification>]
[-VLanEnabled <Boolean>]
[-VLanID <UInt16>]
[-IPv4AddressPool <StaticIPAddressPool>]
[-IPv6AddressPool <StaticIPAddressPool>]
[-InheritsAddressFromPhysicalNetworkAdapter <Boolean>]
[-IsUsedForHostManagement <Boolean>]
[-VMMServer <ServerConnection>]
[-Name <String>]
[-Description <String>]
[-RemoveVMNetwork]
[-RemoveVMSubnet]
[-RemovePortClassification]
[-RemoveIPv4AddressPool]
[-RemoveIPv6AddressPool]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InheritsAddressFromPhysicalNetworkAdapter
Indicates whether the network adapter inherits its address from a physical network adapter.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4AddressPool
Specifies a static address pool that contains IPv4 addresses.
Type: | StaticIPAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6AddressPool
Specifies a static address pool that contains IPv6 addresses.
Type: | StaticIPAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsUsedForHostManagement
Indicates whether the virtual network adapter is used for host management.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalSwitchVirtualNetworkAdapter
Specifies a logical switch virtual network adapter object.
Type: | LogicalSwitchVirtualNetworkAdapter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the network adapter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveIPv4AddressPool
Indicates that this cmdlet removes an IPv4 address pool.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveIPv6AddressPool
Indicates that this cmdlet removes an IPv6 address pool.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemovePortClassification
Indicates that this cmdlet removes a port classification.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMNetwork
Indicates that this cmdlet removes a virtual machine network.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMSubnet
Indicates that this cmdlet removes a virtual machine subnet.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMNetwork
Specifies a VM network object.
Type: | VMNetwork |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMSubnet
Specifies a virtual machine subnet object.
To obtain a VMSubnet object, use the Get-SCVMSubnet cmdlet.
Type: | VMSubnet |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |