@@ -60,6 +60,14 @@ function Get-CIPPStandards {
6060 $CurrentStandard = $Item.PSObject.Copy ()
6161 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
6262
63+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
64+ $reportAction = [pscustomobject ]@ {
65+ label = ' Report'
66+ value = ' Report'
67+ }
68+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
69+ }
70+
6371 $Actions = $CurrentStandard.action.value
6472 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
6573 if (-not $ComputedStandards.Contains ($StandardName )) {
@@ -75,6 +83,14 @@ function Get-CIPPStandards {
7583 $CurrentStandard = $Value.PSObject.Copy ()
7684 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
7785
86+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
87+ $reportAction = [pscustomobject ]@ {
88+ label = ' Report'
89+ value = ' Report'
90+ }
91+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
92+ }
93+
7894 $Actions = $CurrentStandard.action.value
7995 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
8096 if (-not $ComputedStandards.Contains ($StandardName )) {
@@ -190,6 +206,14 @@ function Get-CIPPStandards {
190206 $CurrentStandard = $Item.PSObject.Copy ()
191207 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
192208
209+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
210+ $reportAction = [pscustomobject ]@ {
211+ label = ' Report'
212+ value = ' Report'
213+ }
214+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
215+ }
216+
193217 $Actions = $CurrentStandard.action.value
194218 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
195219 if (-not $ComputedStandards.Contains ($StandardName )) {
@@ -204,6 +228,14 @@ function Get-CIPPStandards {
204228 $CurrentStandard = $Value.PSObject.Copy ()
205229 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
206230
231+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
232+ $reportAction = [pscustomobject ]@ {
233+ label = ' Report'
234+ value = ' Report'
235+ }
236+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
237+ }
238+
207239 $Actions = $CurrentStandard.action.value
208240 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
209241 if (-not $ComputedStandards.Contains ($StandardName )) {
@@ -230,6 +262,14 @@ function Get-CIPPStandards {
230262 $CurrentStandard = $Item.PSObject.Copy ()
231263 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
232264
265+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
266+ $reportAction = [pscustomobject ]@ {
267+ label = ' Report'
268+ value = ' Report'
269+ }
270+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
271+ }
272+
233273 # Filter actions only 'Remediate','warn','Report'
234274 $Actions = $CurrentStandard.action.value | Where-Object { $_ -in ' Remediate' , ' warn' , ' Report' }
235275 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
@@ -245,6 +285,14 @@ function Get-CIPPStandards {
245285 $CurrentStandard = $Value.PSObject.Copy ()
246286 $CurrentStandard | Add-Member - NotePropertyName ' TemplateId' - NotePropertyValue $Template.GUID - Force
247287
288+ if ($CurrentStandard.action.value -contains ' Remediate' -and -not ($CurrentStandard.action.value -contains ' Report' )) {
289+ $reportAction = [pscustomobject ]@ {
290+ label = ' Report'
291+ value = ' Report'
292+ }
293+ $CurrentStandard.action = @ ($CurrentStandard.action ) + $reportAction
294+ }
295+
248296 $Actions = $CurrentStandard.action.value | Where-Object { $_ -in ' Remediate' , ' warn' , ' Report' }
249297 if ($Actions -contains ' Remediate' -or $Actions -contains ' warn' -or $Actions -contains ' Report' ) {
250298 if (-not $ComputedStandards.Contains ($StandardName )) {
0 commit comments