This cmdlet enables or disables ports on a managed RackSwitch or Flex System switch.
Set-LXCASwitchPort [-Connection LXCAConnection]
-Action String
-Port String[]
-Uuid String
[CommonParameter]
Specifies whether to enable or disable the specified ports. This can be of the following values:
enable
disable
To determine the current state of the port, use the Get-LXCARackSwitch cmdlet.
This cmdlet modifies the port state. No object is returned.
The following example disables specific ports in a managed switch.
$cred = Get-Credential
Connect-LXCA -Host 1.111.11.11 -Port 443 -Credential $cred
Set-LXCASwitchPort –Action disable –Port "Ethernet1/1","Ethernet1/3" –Uuid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Disconnect-LXCA
The following example enables all ports in a managed switch.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Port 443 -Credential $cred
$rackSwitch = Get-LXCARackSwitch –Uuid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
$portList=@();
foreach($i in $rackswitch.Ports) { $portList+=( ,$i.Port)}
Set-LXCASwitchPort –Action enable –Port $portList –Uuid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Disconnect-LXCA