Skip to content

Commit

Permalink
fix policy removal
Browse files Browse the repository at this point in the history
  • Loading branch information
William-Francillette committed Nov 28, 2023
1 parent 119b802 commit f18abeb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,8 @@ function Set-TargetResource
}
elseif ($Ensure -eq 'Absent' -and $currentPolicy.Ensure -eq 'Present')
{
Write-Verbose -Message "Removing Endpoint Protection Policy {$currentPolicy.DisplayName}"
Remove-MgBetaDeviceManagementConfigurationPolicy -DeviceManagementConfigurationPolicyId $Identity
Write-Verbose -Message "Removing Endpoint Protection Policy {$($currentPolicy.DisplayName)}"
Remove-MgBetaDeviceManagementConfigurationPolicy -DeviceManagementConfigurationPolicyId $currentPolicy.Identity
}
}

Expand Down

0 comments on commit f18abeb

Please sign in to comment.