Microsoft Endpoint Manager Intune

Dynamische Gruppe für Autopilot Devices: Query:
(device.devicePhysicalIDs -any (_ -contains "[ZTDId]"))

For all iPhone and iPad devices:
(device.deviceOSType -contains "iPhone" -or device.deviceOSType -contains "iPad")

For all iPhone and iPad devices that are personal devices:
(device.deviceOSType -contains "iPhone" -or device.deviceOSType -contains "iPad") -and (device.deviceOwnership -contains "Personal")

For all iPhone and iPad devices that are corporate devices:
(device.deviceOSType -contains "iPhone" -or device.deviceOSType -contains "iPad") -and (device.deviceOwnership -contains "Company")

For macOS devices:
(device.deviceOSType -contains "OSX" -or device.deviceOSType -contains "macOS" -or device.deviceOSType -contains "MacMDM")

For macOS devices that are personal devices:
(device.deviceOSType -contains "OSX" -or device.deviceOSType -contains "macOS" -or device.deviceOSType -contains "MacMDM") -and (device.deviceOwnership -contains "Personal")

For macOS devices that are corporate devices:
(device.deviceOSType -contains "OSX" -or device.deviceOSType -contains "macOS" -or device.deviceOSType -contains "MacMDM") -and (device.deviceOwnership -contains "Company")

For iPhone devices:
(device.deviceOwnership -contains "Personal")

For iPad devices:
(device.deviceOwnership -contains "Company")

Hardware ID Auslesen für Autopilot:

New-Item -Type Directory -Path "C:\HWID"
Set-Location -Path "C:\HWID"
$env:Path += ";C:\Program Files\WindowsPowerShell\Scripts"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Install-Script -Name Get-WindowsAutopilotInfo
Get-WindowsAutopilotInfo -OutputFile AutopilotHWID.csv