HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to OneView using PowerShell Connect-HPOVMgmt due to certificate is invalid

Simpat
Frequent Advisor

Unable to connect to OneView using PowerShell Connect-HPOVMgmt due to certificate is invalid

I want to import rack servers to OneView using PowerShell New-HPOVServer.

First, I must connect to OneView appliance, right?

I used command Connect-HPOVmgmt hponeview.mydomain.local -User Administrator -password MyPassword. 

I have got this error about certificate error:

 

cmdlet Connect-HPOVMgmt at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
User: Administrator
Send-HPOVRequest : The remote certificate is invalid according to the validation procedure.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\HPOneView\HPOneView.psm1:1137 char:35
+ $script:MaxXAPIVersion = (Send-HPOVRequest $script:applXApiVersion).curr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Send-HPOVRequest

Password: ************
Send-HPOVRequest : The remote certificate is invalid according to the validation procedure.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\HPOneView\HPOneView.psm1:1158 char:21
+ $resp = Send-HPOVRequest $script:loginSessionsUri POST $authinfo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Send-HPOVRequest

 

Can someone help me please?

|------------- ( ^__^ )--------------|
I'm Happy when You're Happy
3 REPLIES
ChrisLynchHPE
Neighborhood Moderator

Re: Unable to connect to OneView using PowerShell Connect-HPOVMgmt due to certificate is invalid

The library uses Windows to validate the certificate from the appliance.  As long as the Hostname you are passing via Connect-HPOVMgmt matches the hostname of the appliance (or any Server Alternate Name, i.e. IP Address or FQDN), the validation will pass and the command will process.

 

However, if you have your appliane behind a firewall where the hostname or IP Address doesn't match the appliance certificate, validation will fail.  Can you describe in more detail how your appliance is setup and how you are accessing it from your PC?

 

Also,  you can post issues or questions on the Discussions or Issues section of the CodePlex site where the library is located instead of these forums.

FabSan
Occasional Advisor

Re: Unable to connect to OneView using PowerShell Connect-HPOVMgmt due to certificate is invalid

ever got this to work? running into the same issue.... i tried ip and dns....

 

i'm trying to schedule routine backups via powershell since theres no automated way of doing it within the appliance.

 

 

ChrisLynchHPE
Neighborhood Moderator

Re: Unable to connect to OneView using PowerShell Connect-HPOVMgmt due to certificate is invalid

If you are using the current 1.20.0124 library, there is a known bug (see Issue Tracker Bug ID 25 for more details) and am planning to release an update later this evening.