From e820caaf26722bfe8cd0ea28962e09f81dcb9e7e Mon Sep 17 00:00:00 2001 From: Robert McLeod Date: Thu, 28 May 2020 16:46:21 +1000 Subject: [PATCH] Create or Update User does not require `Name` for updates --- functions/Set-User.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/Set-User.ps1 b/functions/Set-User.ps1 index 851ecf4..97647db 100644 --- a/functions/Set-User.ps1 +++ b/functions/Set-User.ps1 @@ -28,7 +28,7 @@ function Set-User { $Email, # The user's name. - [Parameter(Mandatory = $true, + [Parameter(Mandatory = $false, ParameterSetName = 'Properties')] [ValidateNotNullOrEmpty()] [String] @@ -195,12 +195,11 @@ function Set-User { $path = '/api/v2/users/create_or_update.json' $body = @{ - user = @{ - name = $Name - } + user = @{} } $map = @{ + name = 'Name' email = 'Email' alias = 'Alias' custom_role_id = 'CustomRoleId'