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.
…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"