File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed
Modules/CIPPCore/Public/Standards Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ function Invoke-CIPPStandardEnableAppConsentRequests {
121121 if ($Settings.report -eq $true ) {
122122
123123 $CurrentValue = [PSCustomObject ]@ {
124- EnableAppConsentRequests = $CurrentInfo.isEnabled
124+ EnableAppConsentRequests = [ bool ] $CurrentInfo.isEnabled
125125 ReviewerCount = $CurrentInfo.reviewers.count
126126 }
127127 $ExpectedValue = [PSCustomObject ]@ {
Original file line number Diff line number Diff line change @@ -144,18 +144,12 @@ function Invoke-CIPPStandardMDMScope {
144144
145145 if ($Settings.report -eq $true ) {
146146 $CurrentValue = @ {
147- termsOfUseUrl = $CurrentInfo.termsOfUseUrl
148- discoveryUrl = $CurrentInfo.discoveryUrl
149- complianceUrl = $CurrentInfo.complianceUrl
150- appliesTo = $CurrentInfo.appliesTo
151- customGroup = $CurrentInfo.includedGroups.displayName
147+ appliesTo = $CurrentInfo.appliesTo
148+ customGroup = $CurrentInfo.includedGroups.displayName ?? ' '
152149 }
153150 $ExpectedValue = @ {
154- termsOfUseUrl = $Settings.termsOfUseUrl
155- discoveryUrl = $Settings.discoveryUrl
156- complianceUrl = $Settings.complianceUrl
157- appliesTo = $Settings.appliesTo
158- customGroup = $Settings.customGroup
151+ appliesTo = $Settings.appliesTo
152+ customGroup = $Settings.customGroup ?? ' '
159153 }
160154 Set-CIPPStandardsCompareField - FieldName ' standards.MDMScope' - CurrentValue $CurrentValue - ExpectedValue $ExpectedValue - TenantFilter $Tenant
161155 Add-CIPPBPAField - FieldName ' MDMScope' - FieldValue $StateIsCorrect - StoreAs bool - Tenant $tenant
Original file line number Diff line number Diff line change @@ -133,13 +133,13 @@ function Invoke-CIPPStandardSpoofWarn {
133133 Add-CIPPBPAField - FieldName ' SpoofingWarnings' - FieldValue $CurrentInfo.Enabled - StoreAs bool - Tenant $Tenant
134134
135135 $CurrentValue = @ {
136- Enabled = $CurrentInfo.Enabled
137- AllowList = $CurrentInfo.AllowList
136+ Enabled = $CurrentInfo.Enabled
137+ AllowList = $CurrentInfo.AllowList
138138 IsCompliant = $CurrentInfo.Enabled -eq $IsEnabled -and $AllowListCorrect
139139 }
140140 $ExpectedValue = @ {
141- Enabled = $IsEnabled
142- AllowList = $Settings.AllowListAdd.value ?? $Settings.AllowListAdd
141+ Enabled = $IsEnabled
142+ AllowList = @ ( $Settings.AllowListAdd.value ?? $Settings.AllowListAdd ?? @ ())
143143 IsCompliant = $true
144144 }
145145 Set-CIPPStandardsCompareField - FieldName ' standards.SpoofWarn' - CurrentValue $CurrentValue - ExpectedValue $ExpectedValue - Tenant $Tenant
You can’t perform that action at this time.
0 commit comments