< Back

Connect-NsxLogicalSwitch

Sat Jan 18, 2020 9:00 pm

NAME Connect-NsxLogicalSwitch



SYNOPSIS

Connects a VM to a logical switch





SYNTAX

Connect-NsxLogicalSwitch -VirtualMachine <VirtualMachineInterop[]> [-LogicalSwitch] <XmlElement>

[-ConnectMultipleNics] [-FailOnTimeout] [-WaitTimeout <Int32>] [-Connection <PSObject>] [<CommonParameters>]



Connect-NsxLogicalSwitch -NetworkAdapter <NetworkAdapterInterop[]> [-LogicalSwitch] <XmlElement>

[-ConnectMultipleNics] [-FailOnTimeout] [-WaitTimeout <Int32>] [-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.



Connect-NsxLogicalSwitch accepts either a VM or NIC and attaches it to the

specified LogicalSwitch.





PARAMETERS

-VirtualMachine <VirtualMachineInterop[]>

VM or collection of VMs to attach to specified logical switch.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-NetworkAdapter <NetworkAdapterInterop[]>

Network Adapter or collection of Network Adapters to attach to specified logical switch.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-LogicalSwitch <XmlElement>

Logical Switch to connect NICs or VMs to.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ConnectMultipleNics [<SwitchParameter>]

If specified VM is multi homed, connect all NICs to the same network. Defaults to $false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FailOnTimeout [<SwitchParameter>]

If job reaches -WaitTimeout without failing or completing, do we prompt, or fail with error?



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WaitTimeout <Int32>

Seconds to wait for connection job to complete. Defaults to 30 seconds.



Required? false

Position? named

Default value 30

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





RELATED LINKS