Remove-VMSwitchExtensionPortFeature

Remove-VMSwitchExtensionPortFeature

Removes a feature from a virtual network adapter.

Syntax

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

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

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

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

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

Detailed Description

The Remove-VMSwitchExtensionPortFeature removes a feature from a virtual network adapter. The feature must have already been configured on the virtual network adapter.

Parameters

-ComputerName<String[]>

Specifies one or more Hyper-V hosts from which the feature is to be removed. 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.

Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ExternalPort

Specifies the external port on the virtual switch that binds to a physical network adapter.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementOS

Specifies that the feature is to be removed from the management (e.g. the parent, or host) operating system.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Passthru

Specifies that a Microsoft.HyperV.PowerShell.VMSwitchExtensionPortFeature is to be passed through to the pipeline representing the feature to be removed.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SwitchName<String>

Specifies the name of the virtual switch from which the feature is to be removed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VM<VirtualMachine[]>

Specifies the virtual machine from which the feature is to be removed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMName<String[]>

Specifies the name of the virtual machine from which the feature is to be removed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetworkAdapter<VMNetworkAdapterBase[]>

Specifies the virtual machine network adapter from which the feature is to be removed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetworkAdapterName<String>

Specifies the name of the virtual network adapter from which the feature is to be removed.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMSwitchExtensionFeature<VMSwitchExtensionPortFeature[]>

Specifies the feature to be removed.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

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

Examples

Example 1

Removes a feature configured on the virtual network adapter(s) on a virtual machine.

PS C:\> $feature = Get-VMSwitchExtensionPortFeature -VMName VM2 -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5
PS C:\> Remove-VMSwitchExtensionPortFeature VM2 -VMSwitchExtensionFeature $feature