
Microsoft Entra Conditional Access Dokumentation mit PowerShell
Dieses PowerShell-Skript dokumentiert Ihre Microsoft Entra Conditional Access-Richtlinien. Das Skript exportiert alle Daten als CSV-Datei, die als Excel-Arbeitsmappe formatiert werden kann. Um sicherzustellen, dass alle Richtlinien abgerufen und dokumentiert werden können, verwendet das Skript den Microsoft Graph Beta API-Endpunkt.
Installieren Sie dieses Skript aus dem PowerShell-Katalog (das abhängige Modul Microsoft.Graph.Authentication wird automatisch installiert):
Install-Script -Name Invoke-ConditionalAccessDocumentation -Scope CurrentUserC:\Users\%USERNAME%\Documents\WindowsPowerShell\Scripts~/.local/share/powershell/scriptsStellen Sie eine Verbindung zu Microsoft Graph her
Connect-Graph -Scopes "Application.Read.All", "Group.Read.All", "Policy.Read.All", "RoleManagement.Read.Directory", "User.Read.All", "NetworkAccess.Read.All" -ContextScope ProcessConnect-Graph verbinden.Connect-MgGraph -AccessToken $((Get-Clipboard -Raw).Replace("Bearer ","").Replace("`n","") | ConvertTo-SecureString -AsPlainText -Force)Führen Sie das Skript mittels PowerShell-Dot-Sourcing aus
.\Invoke-ConditionalAccessDocumentation.ps1(Optional) Formatieren Sie die CSV hübsch mit Excel und speichern Sie sie als Excel-Arbeitsmappe
