1. 安装HPiLOCmdlets-x64.msi
2. 环境配置
PS C:\Users\Sxxxxxxx> $env:PSModulePath+=";$env:C:\Program Files\Hewlett-Packard\PowerShell\Modules"
3. PS访问HPILO
PS C:\Windows\system32> get-command "*ilo*"
PS C:\Windows\system32> Find-HPiLO -?
#若要查看範例,請輸入: "get-help Find-HPiLO -examples".
#如需詳細資訊,請輸入: "get-help Find-HPiLO -detailed".
#如需技術資訊,請輸入: "get-help Find-HPiLO -full".
#如需線上說明,請輸入: "get-help Find-HPiLO -online"
PS C:\Windows\system32> get-help Find-HPiLO -examples
#测试IP是否为ILO
PS C:\Windows\system32> Find-HPiLO 10.76.xx.xx -Timeout 1000
IP : 10.76.xx.xx
HOSTNAME :
SPN : ProLiant DL380 Gen9
FWRI : 2.61
PN : Integrated Lights-Out 4 (iLO 4)
SerialNumber : 6xxxxx
UUID : xxx3137-3xxx-4xxx-5xxxx-32xxxxx84E35
#147,148,149,150
PS C:\Windows\system32> Find-HPiLO "10.76.1.147-150"
#147,150
PS C:\Windows\system32> Find-HPiLO "10.76.1.147,150"
#禁用SSL验证
PS C:\Windows\system32> [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
#提供登陆认证凭据
PS C:\Windows\system32> $psc = Get-Credential -Message "Enter username and Password(Use same credential for multiple servers)"
#获取HPILO IML日志信息
PS C:\Windows\system32> Get-HPiLOIML -Credential $psc -Server 10.XXXXXX.88:443
IP : 10.XXXXXX.88
HOSTNAME :
STATUS_TYPE : OK
STATUS_MESSAGE : OK
DESCRIPTION : Integrated Management Log
EVENT : {@{CLASS=Maintenance; COUNT=1; DESCRIPTION=IML Cleared (System Administrator); EVENT_CLASS=0x0021; EVENT_CODE=0x0001; INITIAL_UPDATE=06/29/2017 08:25; LAST
_UPDATE=06/29/2017 08:25; SEVERITY=Informational}, @{CLASS=POST Message; COUNT=1; DESCRIPTION=Option ROM POST Information: 1785-Slot 0 Drive Array Not Conf
igured.; EVENT_CLASS=0x000a; EVENT_CODE=0x0004; INITIAL_UPDATE=09/05/2017 07:19; LAST_UPDATE=09/05/2017 07:19; SEVERITY=Informational}, @{CLASS=POST Messag
e; COUNT=3; DESCRIPTION=Option ROM POST Information: Action: Use the HP SSA to configure the attached drives.; EVENT_CLASS=0x000a; EVENT_CODE=0x0004; INITI
AL_UPDATE=[NOT SET] ; LAST_UPDATE=12/14/2017 01:35; SEVERITY=Informational}, @{CLASS=Power; COUNT=4; DESCRIPTION=System Power Supply: Input Power Loss or U
nplugged Power Cord, Verify Power Supply Input (Power Supply 1); EVENT_CLASS=0x000b; EVENT_CODE=0x0001; INITIAL_UPDATE=09/05/2017 07:19; LAST_UPDATE=09/05/
2017 07:28; SEVERITY=Repaired}...}
PS C:\Windows\system32> Get-WmiObject Win32_BIOS -ComputerName Server01 -Credential (get-credential Domain01/User01)