Whether you use PowerShell to pull inventory information from Cisco UCS Manager or from VMware vCenter or from Microsoft SCOM, you will find those tools just report the processor name exactly as Intel or AMD display them. I find those strings to be unfriendly if you want to display them for a user or perform any further processing on them.
They look like this:
Intel(R) Xeon(R) CPU E7- 2860 @ 2.27GHz
Intel(R) Xeon(R) CPU E7-L8867 @ 2.13GHz
Intel(R) Xeon(R) CPU E5-2650L 0 @ 1.80GHz
Intel(R) Xeon(R) CPU E5-2643 0 @ 3.30GHz
Intel(R) Xeon(R) CPU E7- 4850 @ 2.00GHz
Intel(R) Xeon(R) CPU E5-2440 0 @ 2.40GHz
Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz
Intel(R) Xeon(R) CPU X5687 @ 3.60GHz
Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
Take a look at the list above and notice all the irregularities:
1. The E7 processors have a space after the dash and the E5 processors do not.
2. The E5 processors have a zero between the model name and the speed.
3. The Westmere/Nehalem processors have a lot of spaces between the word CPU and the model name.
4. Second generation E5 processors have "v2" after the model name.
In addition to these irregularities, you likely don't need the words Xeon or CPU or the speed of the processor.
How do we make the ugly list above look like the list below?
Intel E5-2695 v2
It's all done with regular expressions in PowerShell. If you're not already familiar, a regular expression is a very powerful search mechanism that can appear very intimidating to the uninitiated. Luckily, I've written a function called Get-FriendlyProcName that takes care of the all of the complicated searching and replacing for you. You can provide it a single argument or give it pipeline input like this:
Get-FriendlyProcName "Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz"
Hello Cisco Team,Currently, I have this UCS 5108 AC M5 Blade Server, I'm trying to connect to the system via connector as shown in the picture, the system is up and running but I'm not able to see the screen. This is the first time I'm working on this mac...
Hi Experts,I have UCS C 210 M2 and have ESXi host 4.0.1 installed on it, when I rebooted the UCS it gave me this issue "The Following VDs are affected:00,01,02" if any one can support me please, also there is 2 attachments show the issuethanks
I am really having a nightmare that is called S3260! Tons of bugs and caveats that face me in every step. Currently, I am trying to install windows server 2016/2019 on any of its disks/LUNs but it fails. In the Legacy mode, it boots from the kvm mapped wi...
I have a problem with my UCS blade Avail State, and all of blade server is stucking in the same state:unavailable.After two days self troubleshooting, I still couldn't found out the root cause.Hope I can get some gudie from this community.Please provide s...