Skip to content

Commit 95af8bb

Browse files
authored
Merge pull request #529 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 0a28d64 + bad94a0 commit 95af8bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecUpdateDriftDeviation.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ function Invoke-ExecUpdateDriftDeviation {
4949
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'remediate' -Value $true -Force
5050
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'report' -Value $true -Force
5151
$Settings = $StandardTemplate
52+
} elseif ($Setting -like '*ConditionalAccessTemplate*') {
53+
$Setting = 'ConditionalAccessTemplate'
54+
$TemplateId = $Deviation.standardName.split('.') | Select-Object -Last 1
55+
$StandardTemplate = $StandardTemplate.standardSettings.ConditionalAccessTemplate | Where-Object { $_.TemplateList.value -eq $TemplateId }
56+
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'remediate' -Value $true -Force
57+
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'report' -Value $true -Force
58+
$Settings = $StandardTemplate
5259
} else {
5360
$StandardTemplate = $StandardTemplate.standardSettings.$Setting
5461
$StandardTemplate.standards.$Setting | Add-Member -MemberType NoteProperty -Name 'remediate' -Value $true -Force

0 commit comments

Comments
 (0)