Here is another small script from the Quick & Dirty series. If you use HP Blade Enclosures and want to have a quick and easy overview of which blades are in which enclosures, the following script could be useful for you.
The script queries all registered blade enclosures and lists the blades for each enclosure (tested with C7000 G3). The iLO IP, model and serial number, as well as the name and bay of the blade are recorded and sent by e-mail.
If you want, you can also modify the script slightly and create a CSV file or similar with the data.
But here is the script, simply change the first 5 lines accordingly and execute via PowerShell:
$SMTPServer = "smtp.frankysweb.local" $from = "hp@frankysweb.de" $to = "frank@frankysweb.de" $subject = "Blades" [array]$bladeenclosures = "enc01.frankysweb.local", "enc02.frankysweb.local", "enc03.frankysweb.local"
The script can be downloaded here:
The script retrieves the data via XML from the Onboard Administrator, so no further SnpIns are required for the PowerShell.
However, HP also offers special PowerShell modules that can even be used to configure the servers:
http://www8.hp.com/us/en/products/server-software/product-detail.html?oid=5440657#!tab=features
The Exchange Reporter has a module that can deliver data to HP servers. I don't have any hardware from other manufacturers, otherwise this could be expanded if necessary.