lab-toolkit

Needs admin password

Intune / Autopilot troubleshooting

Quick state check on the PC (read-only):

irm https://spieles.us/win/intune/get-device-info.ps1 | iex

Timing: most “failures” are just waiting

Cloud records update on different clocks. Before you change anything, confirm the previous change has landed.

Rules of thumb:


Symptoms and fixes

PC came up as a normal Windows setup, not the organization’s sign-in

Device not found in Autopilot devices

“This device is not properly managed” (or similar) logon message

Computer GPOs not applying / wrong drive maps or printers

Hybrid join incomplete (Domain joined: YES, Entra joined: NO)

Entra join broken after a rename

Apps missing in Company Portal or “not the primary user” error

Required apps or policies not arriving

Can’t add a device to a group

Hash upload fails or sign-in loops

OOBE stuck on network or credential errors

Duplicate or stale records after re-imaging


Useful commands on the PC

dsregcmd /status                       # join state, device ID, PRT
gpupdate /force                        # reapply Group Policy
Get-Service IntuneManagementExtension  # Win32 app/script agent
# Collect MDM/Autopilot diagnostics into a .cab for deeper digging:
mdmdiagnosticstool.exe -area "DeviceEnrollment;DeviceProvisioning;Autopilot" -cab C:\Temp\mdmdiag.cab