Skip to content

Commit

Permalink
Update Set-JCPolicy.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc authored Nov 6, 2024
1 parent cd94d06 commit 820ec71
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions PowerShell/JumpCloud Module/Public/Policies/Set-JCPolicy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ function Set-JCPolicy {
break
}
}
# only update newName or Notes:
if ((("NewName" -in $params.keys) -AND ("Values" -notin $params.Keys)) -OR
(("Notes" -in $params.keys) -AND ("Values" -notin $params.Keys))) {
$Values = $foundPolicy.values
}
# get the notes if it's not in the param set
if (-not $PSBoundParameters["Notes"]) {
$Notes = $foundPolicy.Notes
}
if ($DynamicParamSet) {
# begin dynamic param set
$newObject = New-Object System.Collections.ArrayList
Expand Down

0 comments on commit 820ec71

Please sign in to comment.