ProLiant Servers (ML,DL,SL)
1753775 Members
7569 Online
108799 Solutions
New Discussion

Query HDD model/firmware from script - Windows

 
SOLVED
Go to solution
SSIT
Occasional Visitor

Query HDD model/firmware from script - Windows

Hi,

 

I am trying to find a way to query HDD model number and firmware revision programmatically to automate some things in our MSP package. We have multiple ML/DL servers sitting on various client sites and running through each of them manually is not an option.

I've tried the hpacucli but I can't see how can I script the commands and output is less from ideal from parsing point of view. Is there a way to make the output more machine-readable, like XML or CSV; or maybe some kind of WMI query would be even better?

4 REPLIES 4
IanM
Occasional Contributor

Re: Query HDD model/firmware from script - Windows

I think we're looking at the same problem. I wanted to do for something similar in our msp package.

 

Instead of just pulling the firmware versions I'm looking for a way to run a query on each machine to let me know which patches need to be installed. The app exists - its just the output which I want to vary.

 

Still haven't worked out a way to do this though.

BradV
Esteemed Contributor

Re: Query HDD model/firmware from script - Windows

I'm not sure how hpacucli runs under Windows.  All of my servers are RHEL.  In my script I use:

 

# Determined the slot number previously and set that to SLOT
hpacucli ctrl slot=${SLOT} pd all show detail | \
grep -i -P '.*(physicaldrive|firmware|status|drive type|size|model).*' > /var/tmp/hpdisks

 You might be able to use findstr under Windows.  Not sure of your exact problem.  Could you give a little more details?

IanM
Occasional Contributor
Solution

Re: Query HDD model/firmware from script - Windows

The syntax under windows is pretty much identical:

 

hpacucli  ctrl all show config detail

SSIT
Occasional Visitor

Re: Query HDD model/firmware from script - Windows

IanM:

WMI query would probably be much better but that will do.

Have to do some parsing in the script.