cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1074
Views
2
Helpful
3
Replies

UCS Powertool code snippet to resolve Product Name instead of PID in Model field

jimstehlik
Level 1
Level 1

Hello All,

I forgotten the code snippet that I need to add to the following line of code so that when I display the model field, it actually display the product name verses the PID.

Get-UcsBlade -Ucs $handleArray | Sort-Object -Property Ucs,ChassisID,SlotID | Select-Object Ucs,ServerId,Name,UsrLbl,Model,AvailableMemory,NumOfCpus,NumOfCores,NumOfCoresEnabled,NumOfThreads,NumOfAdaptors,NumOfEthHostIfs,NumOfFcHostIfs,AssignedToDn,Presence,OperState,Operability,OperPower,Serial

Example of output:

Ucs               : AHC-UCS1

ServerId          : 1/1

Name              : AMGS5260

UsrLbl            : CliniCare dB 10.18.113.108

Model             : N20-B6740-2

AvailableMemory   : 262144

NumOfCpus         : 4

NumOfCores        : 32

NumOfCoresEnabled : 32

NumOfThreads      : 64

NumOfAdaptors     : 2

NumOfEthHostIfs   : 2

NumOfFcHostIfs    : 4

AssignedToDn      : org-root/ls-AllScriptsDatabase1-440

Presence          : equipped

OperState         : ok

Operability       : operable

OperPower         : on

Serial            : FCH161374L6

In the GUI for UCSM, it actually displays Cisco UCS B440 M1, but from the above example, the Model displays the PID.

Thank you,

Jim

3 Replies 3

ericwill
Cisco Employee
Cisco Employee

You can pipeline that output into get-ucscapability to get the item out of the UCS Capability Catalog via the API.  That's what the GUI does to give you the friendly name.

Eric,

I tried that, but just get erros.  I guess I'm stil not sure of the syntax.  I tired:

Get-UcsBlade -Ucs $handleArray | Sort-Object -Property Ucs,ChassisID,SlotID | Select-Object Ucs,ServerId,Name,UsrLbl,Model,AvailableMemory,NumOfCpus,NumOfCores,NumOfCoresEnabled,NumOfThreads,NumOfAdaptors,NumOfEthHostIfs,NumOfFcHostIfs,AssignedToDn,Presence,OperState,Operability,OperPower,Serial | get-ucscapability

Thanks again,

Jim

The problem on this James is that you are not pipelining an object that the get-ucscapability understands.  When you pipeline into sort or select, it's creating a different object than pipelined in.  You need to pipeline the blade object in this case right into the get-ucscapability.    

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card