01-16-2015 01:41 PM - edited 07-24-2018 07:23 PM
This PowerTool script connects to one or more UCS domains querying it/them for hardware details on fabric interconnects, chassis, blades and rackmount servers. Using that information it generates an Excel spreadsheet with one sheet per UCS domain, presenting the inventory in the form of an outline. Besides model, part number, etc. it also lists for each element the serial number and firmware version.
There are a few command line parameters, the most important being '-show' which controls the level of detail you get to see. At level one you see only an overview of chassis's, blades and servers. At two the scripts adds CPUs and memory, then all the way up to five where you will get detailed info on each and every DIMM. The following example is at level three.
July 2018 update. Finally I put in the time to update the script from PowerTool version 1.X to 2.X, which also allows for PowerShell version 3. Sorry it took so long. Another big improvement is the change to using the UCS class "equipmentManufacturingDef" to get better naming and such. By doing that I could remove from the script all the manually created tables (which had to be maintained by hand) that were generating proper CPU names and similar stuff. The result is still not perfect but that is because the UCS DOM is after nine years more than a little messy.
Couple of technical things to be aware of. You need to have Microsoft Office installed on the system running the script. Also, don't install the script in C:\ because for some reason the script doesn't have write access there, put it instead in some user directory. This script will store the data retrieved from UCS Manager in a bunch of csv-files in "C:\Temp". Finally there is the '-v' flag with which you can follow the progress of the script.
A fork of this script will fetch an inventory of C-Series and E-Series servers that are not managed by UCS-Manager. You can get it at https://communities.cisco.com/docs/DOC-57125 .
Willem van Schaik
Calgary, Jan 2015, Jul 2018
Nice script Willem van Schaik.
Thank you,
Nitin
Hi Willem,
you are a life saver. this script has helped me alot.
a quick question if i may. is there a version of the script that will pull the same type of information for C series rack servers which are not hooked up to UCSM?
Thanks once again.
Kass
Hi Kass,
Please find attached Inventory-CSeries script that that will pull the same type of information you are looking for.
Let us know if you have any question.
Thank you,
Nitin
Hi Nitin,
cannot see anything attached to your post...
Thanks
We will post the script as a separate document in communities tomorrow after some more testing. Stay tuned.
Hi Reswaran,
Thanks, will look out for it.
Hi Reswaran,
has the script been posted?
Thanks
Here it is: Inventory of standalone UCS C-series and E-series servers
Willem's script is modified for standalone UCS C-series servers. You need to install IMC PowerTool to run this script.
maybe at the bottom of your page (when in edit mode) you can enable the category “UCS PowerTool”
that will take care that the two scripts are seen together
Hi Reswaran, Willem,
Thanks to you both. i will try the script & let you both know how i get on. is there a minimum version of CiMC that needs to be installed for it to work?
Minimum version for the IMC inventory script to work is mandated by the underlying IMC PowerTool. Here is the link - Release Notes for Cisco IMC PowerTool, Release 1.x - Cisco
Your other suggestion on linking this document with IMC inventory is good. Will do it.
Thanks...
Awesome script, huge time saver! Many thanks!
How would I go about adding Service Profiles and Template Instances to the report?
Thanks Again!
Hi I am getting Error "
Enter UCS Credentials of UCS Manager(s)
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
Can't create Excel spreadsheet, is Microsoft Office installed?
Exiting..."
Can anyone help?
Please note: I already have Ms Office Installed and also i am using the c:\temp\ directory as suggested.
It runs for me but produces multiple csv files and not 1 Excel document.
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: