PowerShell - HP iLO Details ermitteln
Beschreibung
Das Script richtet sich an die Administratoren, die einen überblick über eine HP iLO gestütze Umgebung erhalten wollen.
Schritte:
- Erstellen Sie eine Liste mit der Bezeichnung: list-of-ilo-hosts.txt
- Tragen Sie in die Liste die IP-Adressen der iLO Systeme ein.
- Speichern Sie die Liste im selben Verzeichnis ab wie das Script.
- Öffnen Sie eine PS-Console mit Administrator Rechten.
- Führen Sie das Script aus:
C:\temp>.\get-ilo-board.ps1 | out-file ilo-board-reslults.txt
Das Script:
# Get HP iLO board information # NOTE: the Location of the txt file is up to you
$hosts = Get-Content C:\temp\list-of-ilo-hosts.txt foreach ($Hostname in $hosts) { $PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$Hostname'" | Select-Object StatusCode If ($PingStatus.StatusCode -eq 0){ $url = "http://$Hostname/xmldata?item=All" $feed=[xml](new-object system.net.webclient).downloadstring($url) $feed.RIMP.mp.fwri + "`t" + $Hostname + "`t" + $feed.RIMP.hsi.spn + "`t" + $feed.RIMP.mp.pn } }
|
Das Ergebnis:
Version | IP Adresse | HP Model | Bezeichnung
1.94 192.168.2.100 ProLiant DL380 G4 Integrated Lights-Out (iLO) 2.06 192.168.2.121 ProLiant DL360 G5 Integrated Lights-Out 2 (iLO 2) 2.06 192.168.2.122 ProLiant DL360 G5 Integrated Lights-Out 2 (iLO 2) 2.00 192.168.2.123 ProLiant DL360 G6 Integrated Lights-Out 2 (iLO 2)
|
Quelle:
https://sites.google.com/site/powershellandphp/powershell-1/network/get-hp-ilo-board-informations-xml-reader
[Author] Vielen dank für das Script! Nicolas HAHANG [Author]