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.managementType -eq "MDM") -and (device.deviceOwnership -eq "Company") -and ((device.deviceOSType -eq "iPad") -or (device.deviceOSType -eq "iPhone") -or (device.deviceOSType -eq "iPod"))
oder
(device.deviceOSType -contains "iPhone" -or device.deviceOSType -contains "iPad") -and (device.deviceOwnership -contains "Company")

For all Apple Company devices that are setup with a ADM Profile:
(device.managementType -eq "MDM") -and (device.enrollmentProfileName -eq "iOS-Devices Verwaltung") -and ((device.deviceOSType -eq "iPad") -or (device.deviceOSType -eq "iPhone") -or (device.deviceOSType -eq "iPod"))


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.deviceOSType -contains "iPhone")

For iPad devices:
(device.deviceOSType -contains "iPad")

For Android devices:
(device.deviceOSType -contains "Android")

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

PowerShell.exe -ExecutionPolicy Bypass
Install-Script -name Get-WindowsAutopilotInfo -Force
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Get-WindowsAutopilotInfo -Online