08-07-2013 01:57 PM - edited 03-01-2019 11:10 AM
I am trying to obtain the list of Server Ports that have been enabled on the FI-s using Powertool
I am using the below command and I am not getting nada
Get-UcsFabricServerCloud -Id "A" | Get-UcsServerPort -AdminState "enabled"
Have tried without any additional options with no luck
Get-UcsFabricServerCloud -Id "A" | Get-UcsServerPort
The below command gives me a proper output
Get-UcsFabricServerCloud -Id "A"
On a whim, I have also tried the below with no luck
Get-UcsFiLanCloud -Id "A" | Get-UcsUplinkPort -IfRole "server"
Any help appreciated.
Solved! Go to Solution.
08-09-2013 06:34 AM
Similar to my other response, you would be best to start searching from the network element. In this case, I am looking for ports that are of type "ether" and have Interface Role of "server".
PS C:\ucs> Get-UcsNetworkElement | Get-UcsFiModule -Id 1 | Get-UcsPortGroup -Transport ether | Get-UcsFabricPort -IfRole server | select dn, peerdn, ifrole, operspeed | Format-Table
Dn PeerDn IfRole OperSpeed
-- ------ ------ ---------
sys/switch-A/slot-1/switch-ether/port-1 sys/chassis-1/slot-1/fabric/port-1 server 10gbps
sys/switch-A/slot-1/switch-ether/port-2 sys/chassis-1/slot-1/fabric/port-2 server 10gbps
sys/switch-A/slot-1/switch-ether/port-3 sys/chassis-1/slot-1/fabric/port-3 server 10gbps
sys/switch-A/slot-1/switch-ether/port-4 sys/chassis-1/slot-1/fabric/port-4 server 10gbps
sys/switch-B/slot-1/switch-ether/port-1 sys/chassis-1/slot-2/fabric/port-1 server 10gbps
sys/switch-B/slot-1/switch-ether/port-2 sys/chassis-1/slot-2/fabric/port-2 server 10gbps
sys/switch-B/slot-1/switch-ether/port-3 sys/chassis-1/slot-2/fabric/port-3 server 10gbps
sys/switch-B/slot-1/switch-ether/port-4 sys/chassis-1/slot-2/fabric/port-4 server 10gbps
Hope that helps. Let me know if you have any further questions.
Thanks,
Eric
08-09-2013 06:34 AM
Similar to my other response, you would be best to start searching from the network element. In this case, I am looking for ports that are of type "ether" and have Interface Role of "server".
PS C:\ucs> Get-UcsNetworkElement | Get-UcsFiModule -Id 1 | Get-UcsPortGroup -Transport ether | Get-UcsFabricPort -IfRole server | select dn, peerdn, ifrole, operspeed | Format-Table
Dn PeerDn IfRole OperSpeed
-- ------ ------ ---------
sys/switch-A/slot-1/switch-ether/port-1 sys/chassis-1/slot-1/fabric/port-1 server 10gbps
sys/switch-A/slot-1/switch-ether/port-2 sys/chassis-1/slot-1/fabric/port-2 server 10gbps
sys/switch-A/slot-1/switch-ether/port-3 sys/chassis-1/slot-1/fabric/port-3 server 10gbps
sys/switch-A/slot-1/switch-ether/port-4 sys/chassis-1/slot-1/fabric/port-4 server 10gbps
sys/switch-B/slot-1/switch-ether/port-1 sys/chassis-1/slot-2/fabric/port-1 server 10gbps
sys/switch-B/slot-1/switch-ether/port-2 sys/chassis-1/slot-2/fabric/port-2 server 10gbps
sys/switch-B/slot-1/switch-ether/port-3 sys/chassis-1/slot-2/fabric/port-3 server 10gbps
sys/switch-B/slot-1/switch-ether/port-4 sys/chassis-1/slot-2/fabric/port-4 server 10gbps
Hope that helps. Let me know if you have any further questions.
Thanks,
Eric
08-09-2013 06:45 AM
You could also use, to get enabled server ports:
Get-UcsFabricServerCloud -Id "A" -Ucs $ucs | Get-UcsServerPort | ft SwitchID, PortID,SlotID,AdminState -AutoSize
SwitchId PortId SlotId AdminState
-------- ------ ------ ----------
A 1 1 enabled
A 10 1 enabled
A 2 1 enabled
A 3 1 enabled
A 4 1 enabled
A 5 1 enabled
A 6 1 enabled
A 7 1 enabled
A 8 1 enabled
A 9 1 enabled
08-09-2013 07:06 AM
Chris.. For some reason, I dont get any output from using the command. I wonder if it is due to the firmware version.
08-09-2013 07:07 AM
Eric,
Thx again.. I used a subset and have the information about it.
Get-UcsFabricPort -Ucs $kvlogin -IfRole server -AdminState "enabled" -SwitchId "A" | Foreach-Object { $_.portid }
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide