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

connect-HPRest returns a 404 not found response

 
SOLVED
Go to solution
Stan3
Occasional Visitor

connect-HPRest returns a 404 not found response

I am attempting to utilize the HPRestCmdlets version 1.2.0.0 to attached to a 4.0 version of HPOneView.  I have installed the cmdlets on a Windows 2008R2 64 machine and have installed the Powershell 5.1 wmf package.   I have also installed ARC for Chrome to allow me to make rest calls from the browser.  The ARC for chrome connects just fine and returns information as I would expect, so I know that my target, credentials and privileges are ok, but when I try to connect with the connect-HPRest it fails with the 404 error.  Any direction would be appreciated.   Command being used and output below:

Ps> connect-hprest -address MyMachineName -username MyUsername -password MyPassword -Timeout 60

Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."

At C:\hprestcmdlets\1.2.0.0\HPRESTCmdlets.psm1:2014 char:13

+             throw $msg

+             ~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (Exception calli...04) Not Found.":String) [], RuntimeException

    + FullyQualifiedErrorId : Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not F

   ound."

2 REPLIES
ChrisLynchHPE
Neighborhood Moderator
Solution

Re: connect-HPRest returns a 404 not found response

That is because the HPRestCmdlets are for HPE ProLiant iLO 4 and newer, not HPE OneView.  You'll instead need the HPE OneView PowerShell library, which is available on PowerShell Gallery or its project home.  Pease know to install from one of those locations, not both, and the PowerShell Gallery has a dependency defect which will cause the Import-Module to fail.  Execute the following to avoid it, or wait for the next release of the 4.00 library that I'm currently working on publishing. 

Install-Module FormatPX

 

 

 

 

Stan3
Occasional Visitor

Re: connect-HPRest returns a 404 not found response

thank you sir, that did the trick!