- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on
03-04-2015
08:41 AM
- edited on
04-29-2019
08:04 AM
by
Greg Wilkinson
This PowerShell and PowerTool script connects to one or more standalone UCS C-series and E-series servers querying it/them for hardware details. Using that information it generates an excel spreadsheet 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 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 the C-series or E-series server 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 advantage of having it in a spreadsheet is that it can be used for modelling the data, for example when doing capacity planning for a tech-refresh. But for others it will be simply a tool for asset tracking.
Few points to be aware of:
- You need to have Cisco IMC PowerTool and Microsoft Office installed on the system running the script.
- Do not 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 Cisco IMC in a bunch of csv-files in "C:\Temp", plus two conversion tables to translate the 'model' attribute to 'part number' and back.
- Finally there is the '-v' flag with which you can follow the progress of the script.
If you are looking for a similar script for fetching the inventory details of a UCS domain managed by UCS Manager, go to -
UcsInventory - creates an Excel spreadsheet with the UCS hardware inventory
***Updated script (v2) for UCS Power Tool Suite 2.x releases below!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Script is working fine with CIMC Firmware 2.0 but is not working with Firmware 3.0

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello - Do you happen to have additional details here, and possible error messages you are seeing?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
I got the error message below:
cmdlet ImcInventory.ps1 at command pipeline position 1
Supply values for the following parameters:
ip: x.x.x.x
Enter credential for CIMC(s)
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
IMC Domain 'x.x.x.xx'
Can't login to: 'x.x.x.x'
Exiting...

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
OK thank you. And what exact server model and IMC version are you running?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
server model : C240m4
IMC version : 3.0(3f)

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
OK great - and I also should have asked what version of Power Tool you are using?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Power Tool version : CiscoIMC-PowerTool-1.1.1.0

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
OK great. Sorry for all of the questions - that module is very old. I suggest downloading the latest here: Cisco UCS PowerTool Suite - PowerShell Modules for Cisco UCS Manager, Cisco IMC, UCS Central
The new IMC FW versions have enhanced TLS security among other changes and are not compatible with older modules. We are also making some slight changes to the script you are using, but you should be able to generate the files with the newer power tool version.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I downloaded the last version of PowerTool (version 2.3.1)
But I got the same error trying to login to CIMC version 3.
IMC Domain 'x.x.x.xx'
Can't login to: 'x.x.x.x'
Exiting...

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi there - please email me at grewilki at cisco dot com with the errors you are seeing. I will reply to you offline.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I had to make some changes to get this to work with PowerTool 2.4. The changes are in line with the changes Willem made to the script for B-Series. Works great
param(
# [parameter(Mandatory=${true})]
[string]${ip},
[INT]${show},
[switch]${summ},
[switch]${verb}
Also the module name changed.
Change:
# Check for PowerTool module
if ((Get-Module | where {$_.Name -ilike "CiscoImcPS"}).Name -ine "CiscoImcPS")
{
Write-Host "Loading Module: Cisco IMC PowerTool Module"
Write-Host ""
Import-Module CiscoImcPS
}
To:
# Check for PowerTool module
if ((Get-Module | where {$_.Name -ilike "Cisco.IMC"}).Name -ine "Cisco.IMC")
{
Write-Host "Loading Module: Cisco IMC PowerTool Module"
Write-Host ""
Import-Module Cisco.IMC
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
the script is running fine for our C-Series Server, except for UCS C3260 (2x UCS C3X60M4).
The csv files contains serials and assets of booth C3X60M4, but serial of C3260 is missing and xlsx files are not generated.
Is there an update of the script planned for the future?
BR,
Carsten

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Carsten - apologies for the issues you are facing. Please try the latest scripts v2.1 and let me know if this version addresses your concerns.