-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
754cfb8
commit d9a0dde
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ function New-DuoUser { | |
The name of the user to create. | ||
.PARAMETER Aliases | ||
Username aliases for the user. Up to eight aliases may be specified with this parameter as a set of URL-encoded key-value pairs e.g. alias1=joe.smith&[email protected]. Ignores alias position values not specified. Aliases must be unique amongst users. | ||
Username aliases for the user. Up to eight aliases may be specified with this parameter. Aliases must be unique amongst users. | ||
.PARAMETER FullName | ||
The real name (or full name) of this user. | ||
|
@@ -72,13 +72,13 @@ function New-DuoUser { | |
) | ||
|
||
if ($Aliases) { | ||
$AliasCollection = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) | ||
foreach ($Item in ($Aliases.GetEnumerator() | Sort-Object -CaseSensitive -Property Key)) { | ||
$AliasCollection.Add($Item.Key, $Item.Value) | ||
$x = 1 | ||
$AliasList = $Aliases | ForEach-Object { | ||
'alias{0}={1}' -f $x, [System.Uri]::EscapeDataString($_) | ||
$x++ | ||
} | ||
$AliasString = [System.Web.HttpUtility]::UrlDecode($AliasCollection.ToString()) | ||
$Params.aliases = $AliasList -join '&' | ||
} | ||
|
||
$Params = @{ | ||
username = $Username | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ function Update-DuoUser { | |
The new username. | ||
.PARAMETER Aliases | ||
Username aliases for the user. Up to eight aliases may be specified with this parameter as a set of URL-encoded key-value pairs e.g. alias1=joe.smith&[email protected]. Ignores alias position values not specified. Remove the value for an existing alias by specifying a blank value e.g. alias1=. Aliases must be unique amongst users. | ||
Username aliases for the user. Up to eight aliases may be specified with this parameter. Aliases must be unique amongst users. | ||
.PARAMETER FullName | ||
The new real name (or full name). | ||
|