Zum Inhalt
Kaffeeundcode
Skriptbibliothek
PowerShell 06.10.2026

PowerShell

APP Consistency Checker

APP-Consistency-Checker.ps1

<#
.SYNOPSIS
    APP-Consistency-Checker - Validates App Protection Policies vs Device State.

.DESCRIPTION
    <!-- library-status:start -->
    Prüfstatus: Ungeprüft
    Aus dem bestehenden GitHub-Bestand übernommen; fachliche und Tenant-Abnahme ausstehend.

    <!-- library-status:end -->

    Cross-references configured App Protection Policies (MAM) with the
    actual registration state to ensure no 'unmanaged' leaks.
#>

[CmdletBinding()]
param ()

process {
    Write-Host "[INFO] Verifying App Protection Consistency..." -ForegroundColor Cyan

    $MAMPolicies = Get-MgDeviceAppManagementPolicy
    # Logic to check if policies are correctly mapped to the user group
    # and if devices are actually reporting the policy application.

    Write-Host "[INFO] Policy scan complete. Results exported to console." -ForegroundColor Gray
}