Compartilhar via


Remove-SCLogicalSwitchVirtualNetworkAdapter

Removes a virtual network adapter (VNIC) from a logical switch.

Syntax

Default (Default)

Remove-SCLogicalSwitchVirtualNetworkAdapter
    [-VMMServer <ServerConnection>]
    [-LogicalSwitchVirtualNetworkAdapter] <LogicalSwitchVirtualNetworkAdapter>
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-SCLogicalSwitchVirtualNetworkAdapter cmdlet removes a virtual network adapter that was added to the Uplink Port Profile as part of a logical switch definition.

Examples

Example 1: Delete a logical switch virtual network adapter

PS C:\> $HostVNicVarToRemove = Get-SCLogicalSwitchVirtualNetworkAdapter -ID "6615c2c2-4eaa-4f75-be3e-bbdb8cb25ca1"
PS C:\> Remove-SCLogicalSwitchVirtualNetworkAdapter -LogicalSwitchVirtualNetworkAdapter $HostVNicVarToRemove

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

The second command removes the virtual network adapter. It is no longer deployed with the logical switch.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogicalSwitchVirtualNetworkAdapter

The virtual network adapter to remove.

Parameter properties

Type:LogicalSwitchVirtualNetworkAdapter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.