HewlettPackard / POSH-HPEOneView

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

Update-OVServerFirmware Typo in Line 47981 #651

Closed CermakPOI closed 11 months ago

CermakPOI commented 11 months ago

There is a Variable Name Error in the function Update-OVServerFirmware in Line 47981

The Alias of $InputObject ( $Server) is used here, but this cannot work since alias-Variable Names are not-back-directed to the real Parrameter. So any method on $Server (in this case split) must fail.

When i correct this Line my Firmware Update starts.

Expected Behavior

                    $_ServerBaseID = **$InputObject.**romVersion.Split(" ")[0]

Actual Behavior

                    $_ServerBaseID = **$Server**.romVersion.Split(" ")[0]

Steps to reproduce

Try To call the function Update-OVServerFirmware with all the needed parameters.

System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression. at Update-OVServerFirmware<Process>, C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3534.1611\HPEOneView.830.psm1: line 47981

Version Information

HPE OneView PowerShell Library Version: 8.30.3534.1611

# Output from $PSVersionTable
ChrisLynchHPE commented 11 months ago

This is a duplicate of #642, which the fix will be tracked with. Closing.