POSH-HPEOneView icon indicating copy to clipboard operation
POSH-HPEOneView copied to clipboard

ConvertTo-OVPowerShellscript for Appliance User

Open DungKHoang opened this issue 2 years ago • 1 comments

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


DungKHoang avatar Feb 28 '23 21:02 DungKHoang