< Back

Remove-NsxLogicalSwitch

Sat Jan 18, 2020 9:24 pm

NAME Remove-NsxLogicalSwitch



SYNOPSIS

Removes a Logical Switch





SYNTAX

Remove-NsxLogicalSwitch [-virtualWire] <XmlElement> [-Confirm] [-Connection <PSObject>] [<CommonParameters>]





DESCRIPTION

An NSX Logical Switch provides L2 connectivity to VMs attached to it.

A Logical Switch is 'bound' to a Transport Zone, and only hosts that are

members of the Transport Zone are able to host VMs connected to a Logical

Switch that is bound to it. All Logical Switch operations require a

Transport Zone.





PARAMETERS

-virtualWire <XmlElement>



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompt for confirmation. Specify as -confirm:$false to disable confirmation prompt



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? named

Default value $defaultNSXConnection

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-NsxTransportZone | Get-NsxLogicalSwitch LS6 | Remove-NsxLogicalSwitch



Remove a Logical Switch from all Transport Zones.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-NsxTransportZone -UniversalOnly | Get-NsxLogicalSwitch LS6 | Remove-NsxLogicalSwitch



Remove a Logical Switch from all Universal Transport Zones (use -LocalOnly to

remove from all Local Transport Zones).









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-NsxTransportZone | Get-NsxLogicalSwitch LS6 | Remove-NsxLogicalSwitch -confirm:$false



Remove a Logical Switch from all Transport Zones without confirmation.











RELATED LINKS