HewlettPackard / POSH-HPEOneView

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

Convert to PowerShell script for SPT with BIOS setting - Error in $BiosConsistency #647

Open DungKHoang opened 12 months ago

DungKHoang commented 12 months ago

Expected Behavior

I have a SPT with BIOS Settings and ConsistencyCheck set to ' Exact' The PS script generated by Convertto-OVPowerShellScript for SPT with BIOS settings should the value of $biosConsistency to ' Exact' $biosConsistency = "Exact"

Actual Behavior

$biosConsistency = ""

Steps to reproduce

# -------------- Attributes for ServerProfileTemplate "BIOS - Cohesity SPT – Gen10"
$name                               = "BIOS - Cohesity SPT – Gen10"
$description                        = "Template for Cohesity Server - Gen 10 with BIOS settings"
$shtName                            = "DL380 Gen10"
$sht                                = Get-OVServerHardwareType -Name $shtName
# -------------- Connections section
# -------------- Attributes for BIOS settings
$biosSettings                       = @(
    @{id = 'ProcX2Apic'; value = 'Enabled'}
    )
$biosConsistency                    = ""
New-OVServerProfileTemplate -Name $name -Description $description -ServerHardwareType $sht -ManageConnections $False -Bios -BiosSettings $biosSettings -BiosConsistencyChecking $biosConsistency 

Version Information

HPE OneView PowerShell Library Version (Get-HPOVVersion or $PSLibraryVersion): 8.0.3528.2178 HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer): 8.40.00.480384.00 Output from $PSVersionTable on your Windows Host: PS 7.3.5

ChrisLynchHPE commented 11 months ago

Ah, I found the issue. Looks like the incorrect variable name was used. Will be fixed.