From 911a5307a3e447bac32154809ab3b5c8749d5d0c Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 20 Jul 2022 08:20:20 -0400 Subject: [PATCH] Initial --- ...IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 index d231755dad..b4b236bda4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 @@ -499,9 +499,10 @@ function Export-TargetResource try { $policyTemplateID='d02f2162-fcac-48db-9b7b-b0a3f160d2c2_1' - [array]$policies = Get-MgDeviceManagementConfigurationPolicy ` + [array]$allPolicies = Get-MgDeviceManagementConfigurationPolicy ` -ErrorAction Stop ` - -TemplateId $policyTemplateID + -All:$true + $policies = $allPolicies | Where-Object -FilterScript {$_.TemplateReference.TemplateId -eq $policyTemplateId} if ($policies.Length -eq 0) {