< Back

Get-NsxLogicalSwitch

Sat Jan 18, 2020 9:09 pm

NAME Get-NsxLogicalSwitch



SYNOPSIS

Retrieves a Logical Switch object





SYNTAX

Get-NsxLogicalSwitch [-TransportZone <XmlElement>] [[-Name] <String>] [-Connection <PSObject>] [<CommonParameters>]



Get-NsxLogicalSwitch [[-Name] <String>] -ObjectId <String> [-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

-TransportZone <XmlElement>



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <String>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ObjectId <String>



Required? true

Position? named

Default value

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-NsxLogicalswitch -name LS1



Get a named Logical Switch (LS1) from all transport zones









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



PS C:\\>Get-NsxTransportZone -LocalOnly | Get-NsxLogicalswitch -name LS1



Get a named Logical Switch (LS1) from all Local Transport Zones (use -UniversalOnly

for Universal Transport Zones)









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



PS C:\\>Get-NsxTransportZone | Get-NsxLogicalswitch



Get all logical switches from all Transport Zones.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-NsxTransportZone -UniversalOnly | Get-NsxLogicalswitch



Get all logical switches from all Universal Transport Zones (use -LocalOnly

for Local Transport Zones)











RELATED LINKS