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
@@ -398,12 +401,31 @@ function Get-CIPPStandards {
398
401
}
399
402
}
400
403
}
404
+
# Checking if IntuneTemplates have a license and if the tenant meets it, if not, remove from the arr so we only do ONE license check instead of hundreds.
Set-CIPPStandardsCompareField-FieldName "standards.IntuneTemplate.$TemplateKey"-FieldValue 'This tenant does not have the required license for this standard.'-Tenant $TenantName
414
+
}
415
+
}
416
+
Write-Host"We're removing Intune templates as the correct license is not present for this standard. We do this to not run unneeded cycles. If you're reading this don't touch."
#After the license check we're now going to do a compare for the remaining standards.
419
+
#This compare works by bulk requesting the top=1 entries for intune policies inside of the tenant.
420
+
#if the 'lastModified' timestamp is the same we skip processing this standard too, there's no need because the tenant hasn't changed anything.
421
+
#However, we also check the timestamp of our standardTemplate, if that is newer than the cached lastModified timestamp we also process the standard again, because the template has changed.
422
+
#If our cache for this tenant is blank, we also process the standard.
423
+
}
424
+
}
401
425
402
-
# Emit one object per unique (StandardName, TemplateList.value)
0 commit comments