Kaffeeundcode
Script Library
PowerShell 01.06.2026

Script Workspace

Get AutopilotEvents

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

148_Get-AutopilotEvents.ps1

<#
.SYNOPSIS
    Listet Autopilot Events auf.
    
.DESCRIPTION
    Zeigt Events im Zusammenhang mit Autopilot Deployments.
    Erfordert die Berechtigung 'DeviceManagementServiceConfig.Read.All'.

.NOTES
    File Name: 148_Get-AutopilotEvents.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param()

Get-MgDeviceManagementWindowsAutopilotDeviceIdentity | Select-Object -First 10 | ForEach-Object {
    Get-MgDeviceManagementWindowsAutopilotDeviceIdentityDeploymentProfile -WindowsAutopilotDeviceIdentityId $_.Id
}