File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Entrypoints/Activity Triggers/Standards Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,32 @@ function Push-CIPPStandard {
1212 $Standard = $Item.Standard
1313 $FunctionName = ' Invoke-CIPPStandard{0}' -f $Standard
1414 Write-Information " We'll be running $FunctionName "
15- $Rerun = Test-CIPPRerun - Type Standard - Tenant $Tenant - API " $ ( $Standard ) _$ ( $Item.templateId ) "
15+
16+ if ($Standard -in @ (' IntuneTemplate' , ' ConditionalAccessTemplate' )) {
17+ $API = " $Standard_ $ ( $Item.templateId ) _$ ( $Item.Settings.TemplateList.value ) "
18+ } else {
19+ $API = " $Standard_ $ ( $Item.templateId ) "
20+ }
21+
22+ $Rerun = Test-CIPPRerun - Type Standard - Tenant $Tenant - API $API
1623 if ($Rerun ) {
1724 Write-Information ' Detected rerun. Exiting cleanly'
1825 exit 0
1926 } else {
2027 Write-Information " Rerun is set to false. We'll be running $FunctionName "
2128 }
29+
30+ $script :StandardInfo = @ {
31+ Standard = $Standard
32+ StandardTemplateId = $Item.templateId
33+ }
34+ if ($Standard -eq ' IntuneTemplate' ) {
35+ $script :StandardInfo.IntuneTemplateId = $Item.Settings.TemplateList.value
36+ }
37+ if ($Standard -eq ' ConditionalAccessTemplate' ) {
38+ $script :StandardInfo.ConditionalAccessTemplateId = $Item.Settings.TemplateList.value
39+ }
40+
2241 try {
2342 # Convert settings to JSON, replace %variables%, then convert back to object
2443 $SettingsJSON = $Item.Settings | ConvertTo-Json - Depth 10 - Compress
Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ function Write-LogMessage {
6666 if ($tenantId ) {
6767 $TableRow.Add (' TenantID' , [string ]$tenantId )
6868 }
69+ if ($script :StandardInfo ) {
70+ $TableRow.Standard = [string ]$script :StandardInfo.Standard
71+ $TableRow.StandardTemplateId = [string ]$script :StandardInfo.StandardTemplateId
72+ if ($script :StandardInfo.IntuneTemplate ) {
73+ $TableRow.IntuneTemplateId = [string ]$script :StandardInfo.IntuneTemplateId
74+ }
75+ if ($script :StandardInfo.ConditionalAccessTemplate ) {
76+ $TableRow.ConditionalAccessTemplateId = [string ]$script :StandardInfo.ConditionalAccessTemplateId
77+ }
78+ }
6979
7080 $Table.Entity = $TableRow
7181 Add-CIPPAzDataTableEntity @Table | Out-Null
You can’t perform that action at this time.
0 commit comments