https://www.petervanderwoude.nl/post/automagically-convert-intune-managed-devices-to-autopilot/
Automagically convert Intune managed devices to AutoPilot