vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
743 stars 602 forks source link

In the module VAMI.psm1 the function New-VAMIUser throws an error #536

Closed gungazoo closed 2 years ago

gungazoo commented 2 years ago

Describe the bug

It looks like some of the options have changed for creating a new VAMI user.

$CreateSpec.fullname should be $CreateSpec.full_name $CreateSpec.role should be $CreateSpec.roles

Even after changing those options I still get the error:

Write-Error: Cannot bind argument to parameter 'Exception' because it is null.

but it does in fact create the account.

Reproduction steps

1. PowerShell core on Linux running PowerCLI 12.5
2. New-VAMIUser -Name myuser -Role operator -FullName "My User" -Email "myuser@example.com" -Password "KED6ajz_pde-cxk6bdn" -PasswordExpires -PasswordExpiresAt "1/1/2030" -MaxPasswordAge 999

Expected behavior

It should create a VAMI user.

Additional context

No response