From 754cfb86d0c37a17c6fe316fad96d85b5bc0988e Mon Sep 17 00:00:00 2001 From: John Duprey Date: Fri, 30 Aug 2024 18:12:48 -0400 Subject: [PATCH] Update Update-DuoUser.ps1 --- DuoSecurity/Public/Admin API/Users/Update-DuoUser.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DuoSecurity/Public/Admin API/Users/Update-DuoUser.ps1 b/DuoSecurity/Public/Admin API/Users/Update-DuoUser.ps1 index 0a124e4..3278781 100644 --- a/DuoSecurity/Public/Admin API/Users/Update-DuoUser.ps1 +++ b/DuoSecurity/Public/Admin API/Users/Update-DuoUser.ps1 @@ -76,12 +76,11 @@ function Update-DuoUser { $Params = @{} if ($Aliases) { $x = 1 - $AliasList = foreach ($Alias in $Aliases) { - if ($x -gt 8) { break } - @{ "alias$x" = $Alias } + $AliasList = $Aliases | ForEach-Object { + 'alias{0}={1}' -f $x, [System.Uri]::EscapeDataString($_) $x++ } - $Params.aliases = $AliasList + $Params.aliases = $AliasList -join '&' } if ($Username) { $Params.username = $Username }