Skip to content

Commit e7cc8a0

Browse files
committed
fix edit protection policies
1 parent 5520165 commit e7cc8a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/CIPPCore/Public/Set-CIPPIntunePolicy.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function Set-CIPPIntunePolicy {
2323
$PolicyFile = $RawJSON | ConvertFrom-Json
2424
$Null = $PolicyFile | Add-Member -MemberType NoteProperty -Name 'description' -Value $description -Force
2525
$null = $PolicyFile | Add-Member -MemberType NoteProperty -Name 'displayName' -Value $displayname -Force
26+
$PolicyFile = $PolicyFile | Select-Object * -ExcludeProperty 'apps'
2627
$RawJSON = ConvertTo-Json -InputObject $PolicyFile -Depth 20
2728
$TemplateTypeURL = if ($TemplateType -eq 'windowsInformationProtectionPolicy') { 'windowsInformationProtectionPolicies' } else { "$($TemplateType)s" }
2829
$CheckExististing = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/$PlatformType/$TemplateTypeURL" -tenantid $tenantFilter

0 commit comments

Comments
 (0)