Recently I was looking for a way to see how much memory I have installed on 16 blades that I have in a HP c7000 chassis. These blades are a mix of Windows and ESXi so a script that would cover both is not feasible. But, HP c7000 has a CLI that allows us to see how much memory each blade has.

We’ll use plink to sent this command to the chassis and run the whole thing from PowerShell so we can do string manipulation.

Open PowerShell, make sure that plink is in your PATH or specify the full path to plink and run:

$output = plink -pw "password_for_the_chassis" "username_for_the_chassis@chassis_hostname" "show server info all"

If everything is OK, you shouldn’t see any output. Do:

$output | select-string -pattern "Memory"

… and you should see this.

Capture

…or try this to see the IP addresses, CPUs, serial numbers etc…

$output | select-string -pattern "IP Address"
$output | select-string -pattern "CPU"
$output | select-string -pattern "Serial"
$output | select-string -pattern "FlexNIC"

More Posts


pfSense 2.2 & Amazon AWS site-to-site
March 3, 2015

pfSense 2.2 & Amazon AWS site-to-site

FreeBSD 10.1 on vCloud Air
February 17, 2015

FreeBSD 10.1 on vCloud Air

Azure <---> FreeBSD site-to-site VPN (IPsec)
December 29, 2014

Azure <---> FreeBSD site-to-site VPN (IPsec)

Powershell: Change SNMP settings on a remote server
November 24, 2014

Powershell: Change SNMP settings on a remote server