Skript Beschreibung
Zusammenfassung: Self-Service-Enrollment-Fix - Diagnostics for Autopilot/Enrollment failures.
Prüfstatus: Ungeprüft
Aus dem bestehenden GitHub-Bestand übernommen; fachliche und Tenant-Abnahme ausstehend.
Checks for common enrollment blockers:
- Duplicate device records
- Pending Autopilot registrations
- Local policy conflicts
#>
[CmdletBinding()]
param ()
process {
Write-Host "[INFO] Diagnosing Enrollment issues..." -ForegroundColor Cyan
# 1. Check for duplicate records
$DeviceName = $env:COMPUTERNAME
$Duplicates = Get-MgDevice -Filter "displayName eq '$DeviceName'"
if ($Duplicates