Set-VMNetworkAdapter

Set-VMNetworkAdapter

Configures features of the virtual network adapter in a virtual machine or the management operating system.

구문

Parameter Set: ManagementOS
Set-VMNetworkAdapter -ManagementOS [-AllowTeaming <OnOffState]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DeviceNaming <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-DhcpGuard <OnOffState]> ] [-DynamicIPAddressLimit <UInt32]> ] [-FixSpeed10G <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-IeeePriorityTag <OnOffState]> ] [-IovInterruptModeration <IovInterruptModerationValue]> ] [-IovQueuePairsRequested <UInt32]> ] [-IovWeight <UInt32]> ] [-IPsecOffloadMaximumSecurityAssociation <UInt32]> ] [-MacAddressSpoofing <OnOffState]> ] [-MandatoryFeatureId <String[]> ] [-MaximumBandwidth <Int64]> ] [-MinimumBandwidthAbsolute <Int64]> ] [-MinimumBandwidthWeight <UInt32]> ] [-Name <String> ] [-NotMonitoredInCluster <Boolean]> ] [-PacketDirectModerationCount <Nullable [System.UInt32]> ] [-PacketDirectModerationInterval <Nullable [System.UInt32]> ] [-PacketDirectNumProcs <Nullable [System.UInt32]> ] [-Passthru] [-PortMirroring <VMNetworkAdapterPortMirroringMode]> ] [-ResourcePoolName <String> ] [-RouterGuard <OnOffState]> ] [-StormLimit <UInt32]> ] [-TestReplicaPoolName <String> ] [-TestReplicaSwitchName <String> ] [-VirtualSubnetId <UInt32]> ] [-VmqWeight <UInt32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ResourceObject
Set-VMNetworkAdapter [-VMNetworkAdapter] <VMNetworkAdapterBase> [-AllowPacketDirect] [-AllowTeaming <OnOffState]> ] [-DeviceNaming <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-DhcpGuard <OnOffState]> ] [-DynamicIPAddressLimit <UInt32]> ] [-DynamicMacAddress] [-FixSpeed10G <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-IeeePriorityTag <OnOffState]> ] [-IovInterruptModeration <IovInterruptModerationValue]> ] [-IovQueuePairsRequested <UInt32]> ] [-IovWeight <UInt32]> ] [-IPsecOffloadMaximumSecurityAssociation <UInt32]> ] [-MacAddressSpoofing <OnOffState]> ] [-MandatoryFeatureId <String[]> ] [-MaximumBandwidth <Int64]> ] [-MinimumBandwidthAbsolute <Int64]> ] [-MinimumBandwidthWeight <UInt32]> ] [-NotMonitoredInCluster <Boolean]> ] [-PacketDirectModerationCount <Nullable [System.UInt32]> ] [-PacketDirectModerationInterval <Nullable [System.UInt32]> ] [-PacketDirectNumProcs <Nullable [System.UInt32]> ] [-Passthru] [-PortMirroring <VMNetworkAdapterPortMirroringMode]> ] [-ResourcePoolName <String> ] [-RouterGuard <OnOffState]> ] [-StaticMacAddress <String> ] [-StormLimit <UInt32]> ] [-TestReplicaPoolName <String> ] [-TestReplicaSwitchName <String> ] [-VirtualSubnetId <UInt32]> ] [-VmqWeight <UInt32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMName
Set-VMNetworkAdapter [-VMName] <String> [-AllowPacketDirect] [-AllowTeaming <OnOffState]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DeviceNaming <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-DhcpGuard <OnOffState]> ] [-DynamicIPAddressLimit <UInt32]> ] [-DynamicMacAddress] [-FixSpeed10G <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-IeeePriorityTag <OnOffState]> ] [-IovInterruptModeration <IovInterruptModerationValue]> ] [-IovQueuePairsRequested <UInt32]> ] [-IovWeight <UInt32]> ] [-IPsecOffloadMaximumSecurityAssociation <UInt32]> ] [-MacAddressSpoofing <OnOffState]> ] [-MandatoryFeatureId <String[]> ] [-MaximumBandwidth <Int64]> ] [-MinimumBandwidthAbsolute <Int64]> ] [-MinimumBandwidthWeight <UInt32]> ] [-Name <String> ] [-NotMonitoredInCluster <Boolean]> ] [-PacketDirectModerationCount <Nullable [System.UInt32]> ] [-PacketDirectModerationInterval <Nullable [System.UInt32]> ] [-PacketDirectNumProcs <Nullable [System.UInt32]> ] [-Passthru] [-PortMirroring <VMNetworkAdapterPortMirroringMode]> ] [-ResourcePoolName <String> ] [-RouterGuard <OnOffState]> ] [-StaticMacAddress <String> ] [-StormLimit <UInt32]> ] [-TestReplicaPoolName <String> ] [-TestReplicaSwitchName <String> ] [-VirtualSubnetId <UInt32]> ] [-VmqWeight <UInt32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMObject
Set-VMNetworkAdapter [-VM] <VirtualMachine> [-AllowPacketDirect] [-AllowTeaming <OnOffState]> ] [-DeviceNaming <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-DhcpGuard <OnOffState]> ] [-DynamicIPAddressLimit <UInt32]> ] [-DynamicMacAddress] [-FixSpeed10G <Nullable [Microsoft.HyperV.PowerShell.OnOffState]> ] [-IeeePriorityTag <OnOffState]> ] [-IovInterruptModeration <IovInterruptModerationValue]> ] [-IovQueuePairsRequested <UInt32]> ] [-IovWeight <UInt32]> ] [-IPsecOffloadMaximumSecurityAssociation <UInt32]> ] [-MacAddressSpoofing <OnOffState]> ] [-MandatoryFeatureId <String[]> ] [-MaximumBandwidth <Int64]> ] [-MinimumBandwidthAbsolute <Int64]> ] [-MinimumBandwidthWeight <UInt32]> ] [-Name <String> ] [-NotMonitoredInCluster <Boolean]> ] [-PacketDirectModerationCount <Nullable [System.UInt32]> ] [-PacketDirectModerationInterval <Nullable [System.UInt32]> ] [-PacketDirectNumProcs <Nullable [System.UInt32]> ] [-Passthru] [-PortMirroring <VMNetworkAdapterPortMirroringMode]> ] [-ResourcePoolName <String> ] [-RouterGuard <OnOffState]> ] [-StaticMacAddress <String> ] [-StormLimit <UInt32]> ] [-TestReplicaPoolName <String> ] [-TestReplicaSwitchName <String> ] [-VirtualSubnetId <UInt32]> ] [-VmqWeight <UInt32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




자세한 설명

The Set-VMNetworkAdapter cmdlet configures features of the virtual network adapter in a virtual machine or the management operating system.

매개 변수

-AllowPacketDirect

Indicates that this cmdlet turns on Packet Direct on the network adapter.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

원격 세션이나 원격 컴퓨터에서 cmdlet을 실행합니다. 컴퓨터 이름이나 New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 세션 개체를 입력하세요. 기본값은 로컬 컴퓨터 상의 현재 세션입니다.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which features of the network adapter are to be configured. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Credential<System.Management.Automation.PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DeviceNaming<Nullable [Microsoft.HyperV.PowerShell.OnOffState]>

Specifies whether this adapter uses device naming.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DhcpGuard<OnOffState]>

Specifies whether to drop DHCP messages from a virtual machine claiming to be a DHCP server. Allowed values are On, which drops DHCP messages because the virtualized DHCP server is considered untrusted) or Off, which allows the message to be received because the virtualized DHCP server is considered to be trustworthy.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DynamicIPAddressLimit<UInt32]>

Specifies the dynamic IP address limit, an integer.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-DynamicMacAddress

Assigns a dynamically generated MAC address to the virtual network adapter..


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-FixSpeed10G<Nullable [Microsoft.HyperV.PowerShell.OnOffState]>

Specifies whether the adapter uses fix speed of 10G.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IPsecOffloadMaximumSecurityAssociation<UInt32]>

Specifies the maximum number of security associations that can be offloaded to the physical network adapter that is bound to the virtual switch and that supports IPSec Task Offload. Specify zero to disable the feature.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IeeePriorityTag<OnOffState]>

Specifies whether IEEE 802.1p tagged packets from the virtual machine should be trusted. The value should be either On (trusted) or Off (not trusted). If it is on, the IEEE 802.1p tagged packets will be let go as is. If it is off, the priority value is reset to 0.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IovInterruptModeration<IovInterruptModerationValue]>

Specifies the interrupt moderation value for a single-root I/O virtualization (SR-IOV) virtual function assigned to a virtual network adapter. Allowed values are Default, Adaptive, Off, Low, Medium, and High. If Default is chosen, the value is determined by the physical network adapter vendor’s setting. If Adaptive is chosen, the interrupt moderation rate will be based on the runtime traffic pattern.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IovWeight<UInt32]>

Specifies whether single-root I/O virtualization (SR-IOV) is to be enabled on this virtual network adapter. The relative weight sets the affinity of the virtual network adapter to the assigned SR-IOV virtual function. The range of the value is from 0 through 100. Specify 0 to disable SR-IOV on the virtual network adapter.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-MacAddressSpoofing<OnOffState]>

Specifies whether virtual machines may change the source MAC address in outgoing packets to one not assigned to them. Allowed values are On (allowing the virtual machine to use a different MAC address) and Off (allowing the virtual machine to use only the MAC address assigned to it).


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ManagementOS

Specifies the virtual network adapter in the management operating system to be configured.


별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-MandatoryFeatureId<String[]>

Specifies the unique identifiers of the virtual switch extension features that are required for this virtual network adapter to operate.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-MaximumBandwidth<Int64]>

Specifies the maximum bandwidth, in bits per second, for the virtual network adapter. The specified value is rounded to the nearest multiple of eight. Specify zero to disable the feature.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-MinimumBandwidthAbsolute<Int64]>

Specifies the minimum bandwidth, in bits per second, for the virtual network adapter. The specified value is rounded to the nearest multiple of eight. A value larger than 100 Mbps is recommended.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-MinimumBandwidthWeight<UInt32]>

Specifies the minimum bandwidth, in terms of relative weight, for the virtual network adapter. The weight describes how much bandwidth to provide to the virtual network adapter relative to other virtual network adapters connected to the same virtual switch. The range of the value is from 0 through 100. Specify 0 to disable the feature.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Name<String>

Specifies the name for the virtual network adapter. The cmdlet changes the name to the value that you specify.


별칭

VMNetworkAdapterName

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-NotMonitoredInCluster<Boolean]>

Indicates whether to not monitor the network adapter if the virtual machine that it belongs to is part of a cluster. By default, network adapters for clustered virtual machines are monitored.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PacketDirectModerationCount<Nullable [System.UInt32]>

Specifies the number of packets to wait for before signaling an interrupt.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PacketDirectModerationInterval<Nullable [System.UInt32]>

Specifies the amount of time, in milliseconds, to wait before signaling an interrupt after a packet arrives.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PacketDirectNumProcs<Nullable [System.UInt32]>

Specifies the number of processors to use for virtual switch processing inside of the host.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Passthru

Specifies that an object is to be passed through to the pipeline representing the virtual network adapter to be configured. This is a Microsoft.HyperV.PowerShell.VMInternalNetworkAdapter object, if ManagementOS is specified; or a Microsoft.HyperV.PowerShell.VMNetworkAdapter object otherwise.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PortMirroring<VMNetworkAdapterPortMirroringMode]>

Specifies the port mirroring mode for the network adapter to be configured. Allowed values are None, Source, and Destination. If a virtual network adapter is configured as Source, every packet it sends or receives is copied and forwarded to a virtual network adapter configured to receive the packets. If a virtual network adapter is configured as Destination, it receives copied packets from the source virtual network adapter. The source and destination virtual network adapters must be connected to the same virtual switch. Specify None to disable the feature.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-ResourcePoolName<String>

Specifies the name of the resource pool.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-RouterGuard<OnOffState]>

Specifies whether to drop Router Advertisement and Redirection messages from unauthorized virtual machines. The value can be either On or Off. If On is specified, such messages are dropped. If Off is specified, such messages are sent.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-StaticMacAddress<String>

Assigns a specific a MAC addresss to the virtual network adapter.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-StormLimit<UInt32]>

Specifies the number of broadcast, multicast, and unknown unicast packets per second a virtual machine is allowed to send through the specified virtual network adapter. Broadcast, multicast, and unknown unicast packets beyond the limit during that one second interval are dropped. A value of zero (0) means there is no limit.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-VM<VirtualMachine>

Specifies the virtual machine that has the virtual network you want to configure.


별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VMName<String>

Specifies the name of the virtual machine that has the virtual network adapteryou want to configure.


별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VMNetworkAdapter<VMNetworkAdapterBase>

Specifies the virtual network adapter.


별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VmqWeight<UInt32]>

Specifies whether virtual machine queue (VMQ) is to be enabled on the virtual network adapter. . The relative weight describes the affinity of the virtual network adapter to use VMQ. The range of value is from 0 through 100. Specify 0 to disable VMQ on the virtual network adapter.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-TestReplicaPoolName<String>

This parameter applies only to virtual machines that are enabled for replication. It specifies the name of the network resource pool that will be used by this virtual network adapter when its virtual machine is created during a test failover.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-TestReplicaSwitchName<String>

This parameter applies only to virtual machines that are enabled for replication. It specifies the name of the virtual switch to which the virtual network adapter should be connected when its virtual machine is created during a test failover.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-AllowTeaming<OnOffState]>

Specifies whether the virtual network adapter can be teamed with other network adapters connected to the same virtual switch. The value can be On (allowed) or Off (disallowed).


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-IovQueuePairsRequested<UInt32]>

Specifies the number of hardware queue pairs to be allocated to an SR-IOV virtual function. If receive-side scaling (RSS) is required, and if the physical network adapter that binds to the virtual switch supports RSS on SR-IOV virtual functions, then more than one queue pair is required. Allowed values range from 1 to 4294967295.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-VirtualSubnetId<UInt32]>

Specifies the virtual subnet ID to use with Hyper-V Network Virtualization. Allowed values range from 4096 to 16777215 (2^24 - 1), in addition to 0. Use 0 to clear this parameter.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Confirm

cmdlet을 실행하기 전에 확인 메시지를 표시합니다.


필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행되는 경우 발생할 결과를 보여 줍니다. cmdlet은 실행되지 않습니다.


필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216)

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

  • None by default. If –PassThru is specified, then a Microsoft.HyperV.PowerShell.VMInternalNetworkAdapter is passed through to the pipeline if -ManagementOS is also specified, otherwise Microsoft.HyperV.PowerShell.VMNetworkAdapter.


Example 1

This example enables DHCP Guard on all the virtual network adapters of virtual machine Redmond. When DHCP Guard enabled, if virtual machine Redmond replies to requests from DHCP clients, these replies are dropped.


PS C:\> Set-VMNetworkAdapter -VMName Redmond -DhcpGuard On

Example 2

This example enables port mirroring for all virtual network adapters on virtual machine Kirkland. When port mirroring is enabled, every packet sent or received by this virtual machine is copied and sent to a monitoring virtual machine.


PS C:\> Set-VMNetworkAdapter -VMName Kirkland –PortMirroring Source

Example 3

This example configures the virtual network adapter named PM_Dest as the destination for port mirroring, which configures the virtual machine named Bellevue to monitor network traffic. That is, a copy of every packet sent or received by a monitored virtual machine connected to the same virtual switch is sent to virtual machine Bellevue through virtual network adapter PM_Dest.


PS C:\> Set-VMNetworkAdapter -VMName Bellevue –Name PM_Dest –PortMirroring Destination

Example 4

This example enables VMQ and sets a weight of 100 on every virtual network adapter on the local host.


PS C:\> Get-VMNetworkAdapter –All | Set-VMNetworkAdapter –VmqWeight 100

Example 5

This example configures NIC Teaming for all virtual network adapters of the virtual machine named Redmond.


PS C:\> Get-VM Redmond | Set-VMNetworkAdapter –AllowTeaming On

Example 6

This example sets the same minimum bandwidth weight for all virtual network adapters of three virtual machines: Redmond, Kirkland, and Bellevue. This configuration shares bandwidth equally among all of the virtual network adapters of these virtual machines.


PS C:\> Get-VMNetworkAdapter -VMName Redmond,Kirkland,Bellevue | Set-VMNetworkAdapter -MinimumBandwidthWeight 1

커뮤니티 추가 항목

추가
표시: