You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PowerShell/JumpCloud Module/Public/Users/Set-JCUser.ps1
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,6 @@ UserID has an Alias of _id. This means you can leverage the PowerShell pipeline
239
239
$suspended,
240
240
241
241
[Parameter(ValueFromPipelineByPropertyName=$true,HelpMessage='The manager username, ID or primary email of the JumpCloud manager user; must be a valid user')]
242
-
[string]
243
242
$manager,
244
243
245
244
[Parameter(ValueFromPipelineByPropertyName=$true,HelpMessage='The managedAppleId for the user')]
@@ -322,7 +321,7 @@ UserID has an Alias of _id. This means you can leverage the PowerShell pipeline
322
321
323
322
Write-Debug'Verifying JCAPI Key'
324
323
if ($JCAPIKEY.length-ne40) {
325
-
Connect-JConline
324
+
Connect-JCOnline
326
325
}
327
326
328
327
$hdrs=@{
@@ -563,7 +562,7 @@ UserID has an Alias of _id. This means you can leverage the PowerShell pipeline
563
562
# Get the manager using manager username instead of userId
564
563
if ("manager"-eq$param.Key) {
565
564
if ([System.String]::isNullOrEmpty($param.value)) {
566
-
continue
565
+
$managerValue=$null
567
566
} else {
568
567
# First check if manager returns valid user with id
569
568
# Regex match a userid
@@ -701,7 +700,7 @@ UserID has an Alias of _id. This means you can leverage the PowerShell pipeline
701
700
$URL="$JCUrlBasePath/api/Systemusers/$URL_ID"
702
701
Write-Debug$URL
703
702
704
-
$CurrentAttributes=Get-JCUser-UserID$URL_ID|Select-Object-ExpandProperty attributes |Select-Object value, name
703
+
$CurrentAttributes=Get-JCUser-userid$URL_ID|Select-Object-ExpandProperty attributes |Select-Object value, name
705
704
Write-Debug"There are $($CurrentAttributes.count) existing attributes"
0 commit comments