HewlettPackard / POSH-HPEOneView

PowerShell language bindings library for HPE OneView.
http://hewlettpackard.github.io/POSH-HPEOneView/
125 stars 52 forks source link

CMDLet errors when UUID of 00000000-0000-0000-0000-000000000000 is found #643

Open MSHAFFER64 opened 1 year ago

MSHAFFER64 commented 1 year ago

When creating a array variable from Get-OVServer CMDlet that has a Server UUID containing 00000000-0000-0000-0000-000000000000, this causes other piped CMLets to fail and array or variable not getting set.

Requesting fix for 6.60 and newest OV CMDlet versions.

Expected Behavior

Looking for Get-OVserver to report the issue but do not include in output, this will resolve the issue array variable not containing the issue/error and continue to create the variable/array.

Actual Behavior

Steps to reproduce Example:

$serverlist =Get-OVServer
$rss = $serverlist | Get-OVRemoteSupportSetting

Get-OVRemoteSupportSetting : The requested resource '/rest/support/server-hardware/00000000-0000-0000-0000-000000000000' could not be found. An existing device id must be provided.

At line:27 char:22
+ $rss = $serverlist | Get-OVRemoteSupportSetting
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : ObjectNotFound: (URI:String) [Get-OVRemoteSupportSetting], ResourceNotFoundException
ChrisLynchHPE commented 11 months ago

You need to resolve this issue on the appliance. This isn't a use case the library can really handle. The UUID being all null means that the system board was replaced, but the Product ID or Serial Number was not replaced correctly. Both are required to calculate the server UUID, which OneView then uses.