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:
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!
Script is working fine with CIMC Firmware 2.0 but is not working with Firmware 3.0
Hello - Do you happen to have additional details here, and possible error messages you are seeing?
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...
OK thank you. And what exact server model and IMC version are you running?
server model : C240m4
IMC version : 3.0(3f)
OK great - and I also should have asked what version of Power Tool you are using?
Power Tool version : CiscoIMC-PowerTool-1.1.1.0
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.
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...
Hi there - please email me at grewilki at cisco dot com with the errors you are seeing. I will reply to you offline.
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
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
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.
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: