Kaffeeundcode
Script Library
PowerShell 01.06.2026

Script Workspace

Get AppProtectionPolicies

Review the purpose, inspect the code, then test it safely in your own tenant.

20_Get-AppProtectionPolicies.ps1

<#
.SYNOPSIS
    Listet App-Schutzrichtlinien (MAM) auf.
    
.DESCRIPTION
    Ruft eine Liste von Android- und iOS-App-Schutzrichtlinien ab.
    Erfordert die Berechtigung 'DeviceManagementApps.Read.All'.

.NOTES
    File Name: 20_Get-AppProtectionPolicies.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param()

Connect-MgGraph -Scopes "DeviceManagementApps.Read.All"

Write-Host "Lade Managed App Policies..."
$Policies = Get-MgDeviceAppMgtManagedAppPolicy -All

$Policies | Select-Object DisplayName, Id, Description, CreatedDateTime | Format-Table -AutoSize