HewlettPackard / POSH-HPEOneView

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

Update-OVServerFirmware -firmwareinstallmode firmwareonly requiring server power off in error #673

Open danthomasbbc opened 4 months ago

danthomasbbc commented 4 months ago

Expected Behavior

From the documentation: HPE OneVIew PS 8.50 Update-OVServerFirmware -FirmwareInstallMode Specify the Firmware Baseline Policy mode. Avialable options are:

If task is done via the GUI, then the relevant jobs are applied/queued as expected. Running the job with -FirmwareAndSoftware completes successfully whilst the server is powered on. However, running with '-FirmwareOnly' returns an error for the server not being powered off.

Actual Behavior

C:\Users\tec-fl-dt1> Update-OVServerFirmware -InputObject $OVListHosts -Baseline $targetbaseline -firmwareinstallmode firmwareonly
Update-OVServerFirmware: The provided server resource ################ is not powered off.  Server power state must be off before attempting to install an offline firmware bundle.

PS C:\Users\tec-fl-dt1> 

### Steps to reproduce

```PowerShell
PS C:\Users\tec-fl-dt1> Update-OVServerFirmware -InputObject $OVListHosts -Baseline $targetbaseline -firmwareinstallmode FirmwareOnly -Verbose
VERBOSE: [UPDATE-OVSERVERFIRMWARE] Bound PS Parameters: 
Key                 Value
---                 -----
InputObject         @{type=server-hardware-12; name=###############; serverName=##############; state=Monitored; stateReason=NotApplicable; assetTag=; capabilities=System.Object[]; category=server-hardware; created=1…Baseline            Gen10Plus_2023_09_00_04_Apr24
FirmwareInstallMode FirmwareOnly
Verbose             True

VERBOSE: [UPDATE-OVSERVERFIRMWARE] Called from: <ScriptBlock>
VERBOSE: [UPDATE-OVSERVERFIRMWARE] Verify auth
VERBOSE: [TEST-OVAUTH] Verify Auth for ##################
VERBOSE: [TEST-OVAUTH] $Appliance is [HPEOneView.Appliance.Connection]
VERBOSE: [TEST-OVAUTH] Received HPEOneview.Appliance.Connection Object:
ConnectionID Name                         UserName                           AuthLoginDomain         Default
------------ ----                         --------                           ---------------         -------
1            ################# t################# ############# True

VERBOSE: [NEW-ERRORRECORD] Building ErrorRecord object
Update-OVServerFirmware: The provided server resource ################ is not powered off.  Server power state must be off before attempting to install an offline firmware bundle.

Version Information


Get-OVVersion

#####################      LibraryVersion Path
----------------------------        -------------- ----
ApplianceVersion: 8.70.00.486025.00 8.50.3667.2043 C:\Program Files\WindowsPowerShell\Modules\HPEOneView.850\8.50.3667.2043`

`$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0`