Server Management - Remote Server Management
1748169 Members
4252 Online
108758 Solutions
New Discussion юеВ

Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

 
SOLVED
Go to solution
jakle
Occasional Contributor

Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

Hello,

if I run for example these poweshell commands under powershel 5.1:
1) $Credential = Get-Credential Administrator
2) $con = Connect-HPOA -OA 15.116.26.253 -Credential $Credential
3) $us = Get-HPiLODefaultLanguage -Server 15.116.26.253 -Username "" -Password "" -DisableCertificateAuthentication -OutputType ExternalCommand
4) $con | Invoke-HPOAiLOCommand -iLOCommand $us -Bay 1

I get this output::
Exception calling "Get" with "1" argument(s): "Index was outside the bounds of the array."

The output is correct after downgrading powershell to version 5.0 on my PC

BAY : 1
IP : xxx.xxx.xxx.xxx
HOSTNAME : something.com
STATUS_TYPE : OK
STATUS_MESSAGE : OK
LANG_ID : en
LANGUAGE : English

Unfortunately, the customer does not want to make downgade powershell and command Invoke-HPOAiLOCommand is unusable.

Any advice?
Thanks
Jan

4 REPLIES 4
GokulKS
HPE Pro

Re: Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

Hi Jan,

I tried your commands in my lab which has PS 5.1 installed but i could not reproduce the issue.

Its working for me.

Can i know which version of iLO cmdlets are you using ? If anything less than 1.5 then please upgrade to 1.5 as it has some bug fixes in this area.

Also provide me the $PSVersionTable value from your PS console. Try with any other iLO cmdlet in the same flow and check if its giving same behavior.

Thanks,

Gokul

 


I am a HPE Employee

Accept or Kudo

jakle
Occasional Contributor

Re: Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

Hi Gokul,

There is $PSVersionTable output.
Name Value
---- -----
PSVersion 5.1.14409.1012
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1012
CLRVersion 4.0.30319.36399
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

HPiLOCmdlets: 1.4.0.1
HPOACmdlets: 1.1.0.7

I'll be at the customer next week. I will upgrade HPiLOCmdlets to 1.5.0.0 version, and let you know the result.

Thanks a lot for advice and testing.

Jan

GokulKS
HPE Pro
Solution

Re: Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

Hi Jan,

That explains you have older version of iLO cmdlets but the fix is available in latest version 1.5.

After issue gets resolved please update community about same so that others can be benfiited.

Thanks,

Gokul


I am a HPE Employee

Accept or Kudo

jakle
Occasional Contributor

Re: Invoke-HPOAiLOCommand doesn't work on Powershell 5.1

Hi Gokul,

upgrade hpilocmdlets to version 1.5.0.0 has resolved my problem. Thank you very much.

Jan