You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Set-CIPPIntunePolicy.ps1
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ function Set-CIPPIntunePolicy {
11
11
$APINAME,
12
12
$tenantFilter
13
13
)
14
+
$APINAME='Set-CIPPIntunePolicy'
14
15
#connect to table, get replacement map. This is for future usage. The replacement map will allow users to create custom vars that get replaced by the actual values per tenant. Example:
15
16
# %WallPaperPath% gets replaced by RowKey WallPaperPath which is set to C:\Wallpapers for tenant 1, and D:\Wallpapers for tenant 2
Write-LogMessage-API 'Standards'-tenant $tenant-message "Failed to find template $($Template.TemplateList.value). Has this Intune Template been deleted?"-sev 'Error'
Write-LogMessage-API 'Standards'-tenant $tenant-message "Failed to create or update Intune Template $PolicyName, Error: $ErrorMessage"-sev 'Error'
106
+
}
71
107
}
72
108
73
109
}
74
110
75
111
if ($Settings.alert) {
76
-
#Replace the alert method used in standards with a prettier one, link to the report/template, link to a compare. extended table. etc
77
-
if ($compare) {
78
-
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Policy $($displayname) does not match the expected configuration."-sev Alert
79
-
} else {
80
-
$ExistingPolicy? (Write-LogMessage-API 'Standards'-tenant $Tenant-message "Policy $($displayname) has the correct configuration."-sev Info) : (Write-LogMessage-API 'Standards'-tenant $Tenant-message "Policy $($displayname) is missing."-sev Alert)
112
+
foreach ($Templatein$CompareList) {
113
+
if ($Template.compare) {
114
+
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Template $($Template.displayname) does not match the expected configuration: $($template.compare|ConvertTo-Json)"-sev Alert
115
+
} else {
116
+
$ExistingPolicy? (Write-LogMessage-API 'Standards'-tenant $Tenant-message "Template $($Template.displayname) has the correct configuration."-sev Info) : (Write-LogMessage-API 'Standards'-tenant $Tenant-message "Template $($Template.displayname) is missing."-sev Alert)
0 commit comments