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 iLO local account - Script is not formatted correctly #648

Closed DungKHoang closed 12 months ago

DungKHoang commented 12 months ago

Expected Behavior

I have a SPT with iLO setting for local account and use Converto-OVPowerShellScript to get a PS1 file. The output is not formatted correctly as it has no new line

Actual Behavior

Script should have new line in each command

Steps to reproduce

# -------------- Attributes for ServerProfileTemplate "DEV - iLO- Cohesity SPT - Gen10"
$name                               = "DEV - iLO- Cohesity SPT - Gen10"
$description                        = "iLO Settings for Cohesity servers in DEV"
$shtName                            = "DL380 Gen10"
$sht                                = Get-OVServerHardwareType -Name $shtName
# -------------- Connections section
# -------------- Attributes for iLO settings
$mpConsistency                      = "Exact"
# ------------------- iLO Attribute: Local Accounts # ---------- iLO User: mhsadmin $user1userName                      = "mhsadmin" $user1displayName                   = "mhsadmin" $user1Password                      = Read-Host -Prompt "user1 password" -AsSecureString
New-OVServerProfileTemplate -Name $name -Description $description -ServerHardwareType $sht -ManageConnections $False -ManageIloSettings $True -IloSettingsConsistencyChecking $mpConsistency -IloSettings $iloSettings

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

DungKHoang commented 12 months ago

update title