Invoke-RestMethod : [{"id":"PARAMETER roles","message":"must not be empty"},{"id":"PARAMETER userId","message":"must not be blank"},{"id":"PARAMETER firstName","message":"must not be empty"},{"id":"PARAMETER
source","message":"must not be blank"},{"id":"PARAMETER lastName","message":"must not be empty"},{"id":"PARAMETER emailAddress","message":"must not be empty"}]
At C:\Program Files\WindowsPowerShell\Modules\NexuShell\1.0.0\NexuShell.psm1:106 char:9
+ Invoke-RestMethod @Params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Most of these should (but currently aren't) being satisfied by the existing values on the user, but those aren't coming through properly.
If you manually provide them to the function, those are removed from the list as being needed.
Invoke-RestMethod : [{"id":"PARAMETER userId","message":"must not be blank"},{"id":"PARAMETER source","message":"must not be blank"}]
At C:\Program Files\WindowsPowerShell\Modules\NexuShell\1.0.0\NexuShell.psm1:106 char:9
+ Invoke-RestMethod @Params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand