Add-VMSwitchExtensionPortFeature

Add-VMSwitchExtensionPortFeature

Adds a feature to a virtual network adapter.

구문

Parameter Set: VMName
Add-VMSwitchExtensionPortFeature [-VMName] <String[]> -VMSwitchExtensionFeature <VMSwitchExtensionPortFeature[]> [-ComputerName <String[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ExternalPort
Add-VMSwitchExtensionPortFeature [-SwitchName] <String> -ExternalPort -VMSwitchExtensionFeature <VMSwitchExtensionPortFeature[]> [-ComputerName <String[]> ] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ManagementOS
Add-VMSwitchExtensionPortFeature -ManagementOS -VMSwitchExtensionFeature <VMSwitchExtensionPortFeature[]> [-ComputerName <String[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ResourceObject
Add-VMSwitchExtensionPortFeature [-VMNetworkAdapter] <VMNetworkAdapterBase[]> -VMSwitchExtensionFeature <VMSwitchExtensionPortFeature[]> [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMObject
Add-VMSwitchExtensionPortFeature [-VM] <VirtualMachine[]> -VMSwitchExtensionFeature <VMSwitchExtensionPortFeature[]> [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

자세한 설명

The Add-VMSwitchExtensionPortFeature cmdlet adds a feature supported by a virtual switch extension to a virtual machine network adapter. This cmdlet also configures built-in virtual switch features.

매개 변수

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which a feature is to be added to a virtual network adapter. 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.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ExternalPort

Specifies the virtual switch port connected to the external network interface card.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ManagementOS

Specifies that the feature is to be added in the management (i.e. the parent, or host) operating system.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Passthru

Specifies that an object is to be passed through to the pipeline representing the feature to be added.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-SwitchName<String>

Specifies the name of the virtual switch.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VM<VirtualMachine[]>

Specifies the virtual machine in which the feature is to be added.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VMName<String[]>

Specifies the name of the virtual machine in which the feature is to be added.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VMNetworkAdapter<VMNetworkAdapterBase[]>

Specifies the virtual machine network adapter for which the feature is to be added.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VMNetworkAdapterName<String>

Specifies the name of the virtual machine network adapter for which the feature is to be added.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-VMSwitchExtensionFeature<VMSwitchExtensionPortFeature[]>

Specifies the feature to be added to the virtual switch. You can get such a feature object from Get-VMSystemSwitchExtensionPortFeature to add a new configuration to a virtual network adapter, or from the Get-VMSwitchExtensionPortFeature cmdlet to update an existing configuration.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-Confirm

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

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • None by default; Microsoft.HyperV.PowerShell.VMSwitchExtensionPortFeature if –PassThru is specified.

예제

Example 1

Adds a feature to virtual machine VM2. The feature here is a port security feature supported by the extension Microsoft Virtual Ethernet Switch Native Extension.

PS C:\> $feature = Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings"
PS C:\> $feature.SettingData.EnableDhcpGuard = $true
PS C:\> $feature.SettingData.EnableRouterGuard = $true
PS C:\> Add-VMSwitchExtensionPortFeature -VMName VM2 -VMSwitchExtensionFeature $feature