Skip to content

Commit 3e081d5

Browse files
action add
1 parent 7bbcb33 commit 3e081d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/CIPPCore/Public/New-CippStandardsDriftClone.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function New-CippStandardsDriftClone {
2424
if ($actions | Where-Object { $_.value -eq 'remediate' }) {
2525
$prop.Value | Add-Member -MemberType NoteProperty -Name 'autoRemediate' -Value $true -Force
2626
}
27-
$prop.Value.action = @(@{ 'label' = 'Report'; 'value' = 'Report' })
27+
# Set action to Report using add-member to avoid issues with readonly arrays
28+
$prop.Value | Add-Member -MemberType NoteProperty -Name 'action' -Value @(@{ 'label' = 'Report'; 'value' = 'Report' }) -Force
2829
}
2930
}
3031
}

0 commit comments

Comments
 (0)