HewlettPackard / POSH-HPEOneView

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

ConvertTo-OVPowerShellscript for Appliance User #637

Open DungKHoang opened 1 year ago

DungKHoang commented 1 year ago

The PS script generated for Appliance user from COnvertto-OVPowwerShellscript is NOT correct. Get-OVUser -name HKD | Convertto-OVPowerShellscript


# ------ Create user HKD
$userName                           = "HKD"
$password                           = Read-Host -Message "Provide the password for HKD"
$fullName                   = ""
$permissions                        = @(
    @{Role = "Infrastructure administrator"; Scope = All}
)
New-OVUser -Username $userName -Password $password -Fullname $fullname

$Permissions is NOT correct and there is no parameter passed to New-OVUser

It should say:
New-OVUser -Username $userName -Password $password -Fullname $fullname -Roles 'Infrastructure Administrator' 

### Version Information
HPE OneView PowerShell Library Version (`Get-HPOVVersion` or `$PSLibraryVersion`): 8.0.3334.2865
ApplianceVersion: 8.00.00.470555.00 
Output from `$PSVersionTable` on your Windows Host: PSVersion                      5.1.17763.1852
ChrisLynchHPE commented 1 year ago

There appear to be a few things wrong with the output here:

These will be fixed in the 8.00 and 8.30 libraries.