File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,13 @@ function Invoke-ExecTenantGroup {
3535 if ($groupDescription ) {
3636 $GroupEntity.Description = $groupDescription
3737 }
38- $GroupEntity.GroupType = $groupType
38+ if (! $GroupEntity.PSObject.Properties.Name -contains ' GroupType' ) {
39+ $GroupEntity | Add-Member - NotePropertyName ' GroupType' - NotePropertyValue $groupType - Force
40+ } else {
41+ $GroupEntity.GroupType = $groupType
42+ }
3943 if ($groupType -eq ' dynamic' -and $dynamicRules ) {
40- $GroupEntity.DynamicRules = " $ ( $dynamicRules | ConvertTo-Json - depth 100 - Compress) "
44+ $GroupEntity.DynamicRules = " $ ( $dynamicRules | ConvertTo-Json - Depth 100 - Compress) "
4145 $GroupEntity | Add-Member - NotePropertyName ' RuleLogic' - NotePropertyValue $ruleLogic - Force
4246 } else {
4347 $GroupEntity | Add-Member - NotePropertyName ' RuleLogic' - NotePropertyValue $null - Force
@@ -52,7 +56,7 @@ function Invoke-ExecTenantGroup {
5256 GroupType = $groupType
5357 }
5458 if ($groupType -eq ' dynamic' -and $dynamicRules ) {
55- $GroupEntity.DynamicRules = " $ ( $dynamicRules | ConvertTo-Json - depth 100 - Compress) "
59+ $GroupEntity.DynamicRules = " $ ( $dynamicRules | ConvertTo-Json - Depth 100 - Compress) "
5660 $GroupEntity.RuleLogic = $ruleLogic
5761 }
5862 Add-CIPPAzDataTableEntity @Table - Entity $GroupEntity - Force
You can’t perform that action at this time.
0 commit comments