Server Management - Remote Server Management
1748106 Members
4886 Online
108758 Solutions
New Discussion

Powershell Error - Can't multithread to Connect-HPOA or Connect-HPBIOS

 
rookie1082
Frequent Advisor

Powershell Error - Can't multithread to Connect-HPOA or Connect-HPBIOS

Hello,
 
PLEASE NOTE:  CONNECT-HPEBIOS (released 10/2017) fixes the issue below.  CONNECT-HPOA STILL HAS THIS ISSUE.


I have a CSV that i'm importing with the fields IP, Username, Password to connect to a large amount of HP systems to set BIOS settings.  It's saying that it's having an error converting my PSOjects from the CSV to strings.

Does anyone have this issue or a workaround?  The recent release of HPEBIOSCmdlets fixed the connect-hpbios issue, but the issue still persists for the HPOACmdlets...

Connect-HPOA : Invalid input: Unable to cast object of type 'System.Management.Automation.PSObject' to type 'System.String'.
Parameter name: OA
At line:1 char:23
+ ... nectOA = $csvOA | Connect-HPOA -WarningAction SilentlyContinue -Force
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Connect-HPOA], ArgumentException
    + FullyQualifiedErrorId : HPOACmdlets.ConnectHPOA
2 REPLIES 2
GokulKS
HPE Pro

Re: Powershell Error - Can't multithread to Connect-HPOA or Connect-HPBIOS

Hi,

Can you share the csv details like how you are inputing the data in csv (you can mask the ip address and other senstive details).

Below is the format of csv you should use incase its worng.

PS C:\Windows\system32> $csv = Import-Csv -Path "C:\Temp\inputcsv.csv" -Verbose

PS C:\Windows\system32> $csv

OA Username Password 
-- -------- -------- 
192.168.10.201 administrator xyz

Thanks,

Gokul


I am a HPE Employee

Accept or Kudo

GZahidi
Advisor

Re: Powershell Error - Can't multithread to Connect-HPOA or Connect-HPBIOS

Hi,

It would be more clear if you add  complete command which you are trying to execute.

Looks like you are direct passing imported csv object to Connect-HPOA Cmdlet. That leads to error for type mismatch.

Try it like below snippet.

 

1$csvObj = Import-CSV C:\CsvInput.csv

Connect-HPOA -IP $csvObj.IP -Username $csvObj.Username -Password $csvObj.Password 


I am a HPE Employee