HewlettPackard / PowerShell-ProLiant-SDK

PowerShell sample scripts for managing HPE servers
https://www.hpe.com/servers/powershell
90 stars 42 forks source link

Using Register-HPEiLORemoteSupportSetting to register to insight remote support, not working #82

Closed Emusp closed 1 year ago

Emusp commented 2 years ago

We are in progress of migrating from direct connection to insight remote support.

I want to update all hosts through powershell cmdlets to point to our new insights server with following command with latest 3.3.0.0 modules:

Register-HPEiLORemoteSupportSetting -Connection $con -DestinationURL hostnamehere -DestinationPort 7906 -InterfaceType CentralConnect

However the cmdlet fails with following error.

How do you expect people to migrate to your new insight remote support solution, but with not automation tools update iLO settings?

2022-10-31 16:25:09,814 INFO - [Connect-HPEiLO][x.x.x.x][ProcessiLOXmlData]: XML Reply on: Reading iLO xml data
2022-10-31 16:25:09,829 INFO - [Connect-HPEiLO][x.x.x.x][ProcessiLOXmlData]: iLO FirmwareVersion: iLO5 v2,72 
2022-10-31 16:25:09,829 INFO - [Connect-HPEiLO][x.x.x.x][GetServerInfoFromProductName]: Product Name: ProLiant DL360 Gen10
2022-10-31 16:25:11,487 INFO - [Connect-HPEiLO][x.x.x.x][CreateConnection]: Creating connection for connection type(s): Redfish
2022-10-31 16:25:11,503 INFO - [Connect-HPEiLO][x.x.x.x][Redfish][CreateConnection]: Establishing connection.
2022-10-31 16:25:13,960 INFO - [Connect-HPEiLO][x.x.x.x][Redfish][CreateUsernamePasswordConnection]: Received response for create connection request.
2022-10-31 16:25:14,539 INFO - [Connect-HPEiLO][x.x.x.x][Redfish][CreateUsernamePasswordConnection]: Connection established.
2022-10-31 16:25:14,555 INFO - [Connect-HPEiLO][x.x.x.x][CreateConnection]: Connection established for connection type(s): Redfish
2022-10-31 16:25:22,814 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][ValidateCmdletRecord]: Begin
2022-10-31 16:25:22,814 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][ValidateCmdletRecord]: Getting username and password if credential object is passed.
2022-10-31 16:25:22,814 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][ValidateCmdletRecord]: End
2022-10-31 16:25:22,830 INFO - [Register-HPEiLORemoteSupportSetting][Redfish][GetRedfishModel]: Begin
2022-10-31 16:25:22,899 INFO - [Register-HPEiLORemoteSupportSetting][Redfish][GetCommunicationModel]: End
2022-10-31 16:25:22,899 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateRecord]: Begin
2022-10-31 16:25:22,899 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateFeatureSupportability]: Begin
2022-10-31 16:25:22,899 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateFeatureSupportability]: Validating Cmdlet supportability.
2022-10-31 16:25:22,915 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateCmdlet]: Begin
2022-10-31 16:25:22,915 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateCmdlet]: Checking for iLOGeneration, Model and Firmware for Cmdlet Supportability.
2022-10-31 16:25:22,915 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateCmdlet]: End
2022-10-31 16:25:22,915 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateFeatureSupportability]: Validating parameter supportability.
2022-10-31 16:25:22,915 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameter]: Begin
2022-10-31 16:25:22,930 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameter]: Checking for iLOGeneration, Model and Firmware for parameter Supportability.
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: Begin
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: Validating parameter value supportability.
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: End
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameter]: Checking for iLOGeneration, Model and Firmware for parameter Supportability.
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: Begin
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: Validating parameter value supportability.
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterValue]: End
2022-10-31 16:25:22,935 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameter]: End
2022-10-31 16:25:22,950 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][CheckParameterValueForQuotes]: Begin
2022-10-31 16:25:22,950 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][CheckParameterValueForQuotes]: End
2022-10-31 16:25:22,950 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterGroup]: Begin
2022-10-31 16:25:22,950 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterGroup]: Validating for set of parameters to be given.
2022-10-31 16:25:22,950 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][ValidateParameterGroup]: End
2022-10-31 16:25:22,966 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][GetODataIdFromResourceDirectory]: Begin
2022-10-31 16:25:22,966 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][GetODataIdFromResourceDirectory]: Getting url value from resource instance.
2022-10-31 16:25:23,284 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][GetODataIdFromResourceDirectory]: End
2022-10-31 16:25:23,284 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][GetODataIdFromResourceDirectory]: Begin
2022-10-31 16:25:23,284 INFO - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish][GetODataIdFromResourceDirectory]: Getting url value from resource instance.
2022-10-31 16:25:23,648 ERROR - [Register-HPEiLORemoteSupportSetting][x.x.x.x][Redfish]: 

ExceptionMessage:Path ['Actions'].['#HpeRemoteSupport.CompleteDirectConnectRegistration'].['target'] could not be traversed from /redfish/v1/Managers/1/RemoteSupportService/ to get the terminal URI.
InnerException:.
StackTrace:   at HPE.Framework.Connector.RIS.RISConnector.FilteriLOResource(RISSession risSession, String odataTypeFilter, List`1 httpMethodFilter, String traversalPath)
   at HPE.Framework.Connector.RIS.RISConnector.FilteriLOResourceFirstOrDefault(RISSession risSession, String odataTypeFilter, List`1 httpMethodFilter, String traversalPath)
   at HPE.iLO.Communication.Redfish.RedfishCommunication.GetODataIdFromResourceDirectory(String odataType, String traversalPath, List`1 httpMethodType, String traversalType)
   at HPE.iLO.Communication.Redfish.Model.SetModel.SetMapperUrl()
   at HPE.iLO.Communication.Redfish.Model.SetModel.ValidateRecord(CmdletRecord cmdletRecord)
hp-powershell commented 1 year ago

Hi ,

Fix will be available in our upcoming release HPEiLOCmdlets 4.0 which is scheduled for this week .

Thanks & Regards, Powershell Team