← Back to articles Intune

Converting & Enrolling Existing Active Windows Fleet to Autopilot at Scale: The PowerShell & Graph API Blueprint

Migrating a sprawling legacy Windows fleet to cloud-native management in Microsoft Intune is one of the most critical transformations modern enterprise IT teams face. While procurement workflows typically register brand-new hardware through OEM and CSP channels, existing active workstations—whether Hybrid Azure AD joined, SCCM co-managed, or manually enrolled—require a strategic conversion methodology.

Without an intentional hardware hash harvesting and registration pipeline, administrators often face deployment bottlenecks, duplicate device object conflicts, and broken Out-of-Box Experience (OOBE) provisioning when machines are wiped or refreshed. This deep dive details the architectural blueprints, automation scripts, and governance strategies required to convert existing active devices to Windows Autopilot at scale.

💻 Active Fleet Endpoint Hybrid AD / Intune / SCCM No Wipe Required ⚙️ Hash & Identity Harvest 4K Hardware Hash + Serial PowerShell / Graph API ☁️ Autopilot Cloud Store Device Registration (ZTDID) GroupTag Assigned 🚀 Zero-Touch Ready Next Wipe = Cloud OOBE Zero Admin Touch FIGURE 1: ENTERPRISE AUTOPILOT CONVERSION LIFECYCLE
Figure 1: End-to-End Enterprise Architecture for Converting Active Fleet Endpoints to Windows Autopilot.

The 3 Enterprise Conversion Approaches

Depending on your current management topology, network segmentation, and device state, three primary methods exist for converting existing devices into Windows Autopilot:

1. Intune "Convert all targeted devices to Autopilot" Profile The simplest native method for devices already enrolled in Intune MDM. When toggled on in an Autopilot deployment profile, Intune automatically extracts hardware hashes during device check-in cycles and registers the device in the Autopilot database.
2. Direct PowerShell Ingestion via Microsoft Graph API Ideal for standalone machines, workgroup devices, or domain-joined machines not yet in Intune. Uses an Entra ID App Registration with certificate or secret credentials to upload 4K hardware hashes directly to the tenant without user interaction.
3. Intune Proactive Remediation / Win32 App Package The highest-reliability enterprise approach. A lightweight detection/remediation script runs in the background of active users, extracts the OA3x original product key and hardware hash, and posts it to a secure Azure Function or Graph endpoint with a custom GroupTag.

Method 1: The Native Intune Autopilot Conversion Policy

If your fleet is already enrolled in Intune (via GPO, SCCM co-management, or user enrollment), Microsoft provides a native background conversion switch.

To enable this in the Microsoft Intune Admin Center:

  1. Navigate to Devices > Windows > Windows enrollment > Deployment Profiles.
  2. Create or edit an existing User-Driven Azure AD Joined Autopilot profile.
  3. Under Out-of-box experience (OOBE) settings, toggle "Convert all targeted devices to Autopilot" to Yes.
  4. Assign the profile to an Entra ID Dynamic Security Group containing your existing Windows fleet (e.g. All Windows 11 Endpoints).
⚠️ Critical Latency & Sync Caveat The native conversion process is asynchronous. It takes between 24 to 48 hours for an enrolled device to upload its hardware hash, get assigned a Zero Touch Device ID (ZTDID), and appear in the Autopilot Devices list. Do not wipe or re-image the machine until the Autopilot profile status in Intune displays "Assigned".

Method 2: Direct Automation with PowerShell 7 & Microsoft Graph

For machines requiring immediate registration, or endpoints being staged in IT imaging depots, running a scripted registration pipeline via Microsoft Graph is the fastest and most deterministic path.

The following production-ready PowerShell script extracts the complete hardware hash, handles proxy authentication, and registers the device with a customized GroupTag:

# ==============================================================================
# Enterprise Autopilot Registration & Hardware Hash Ingestion Script
# Author: MSEndpoint Modern Workplace Engineering
# ==============================================================================
[CmdletBinding()]
param(
    [Parameter(Mandatory = $false)]
    [string]$GroupTag = "Corp-Standard-Laptop",

    [Parameter(Mandatory = $false)]
    [string]$AssignedUser = ""
)

Write-Host ">>> [1/4] Checking Execution Environment & Prerequisite Modules..." -ForegroundColor Cyan

# Ensure TLS 1.2 / 1.3
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13

# Install / Import Get-WindowsAutoPilotInfo if missing
if (-not (Get-Module -ListAvailable -Name "Get-WindowsAutoPilotInfo")) {
    Write-Host "Installing Get-WindowsAutoPilotInfo from PSGallery..." -ForegroundColor Yellow
    Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
    Install-Script -Name Get-WindowsAutoPilotInfo -Force -Scope CurrentUser | Out-Null
}

$tempPath = "$env:SystemRoot\Temp\AutopilotRegistration"
if (-not (Test-Path $tempPath)) { New-Item -Path $tempPath -ItemType Directory -Force | Out-Null }
$csvPath = "$tempPath\HWID_$($env:COMPUTERNAME).csv"

Write-Host ">>> [2/4] Harvesting 4K Hardware Hash from WMI..." -ForegroundColor Cyan
& Get-WindowsAutoPilotInfo.ps1 -OutputFile $csvPath

if (-not (Test-Path $csvPath)) {
    throw "Failed to extract hardware hash to $csvPath"
}

$hwidData = Import-Csv -Path $csvPath
Write-Host "Device Serial Number: $($hwidData.'Device Serial Number')" -ForegroundColor Green
Write-Host "Windows Product ID  : $($hwidData.'Windows Product ID')" -ForegroundColor Green

Write-Host ">>> [3/4] Ingesting to Microsoft Intune Autopilot Service..." -ForegroundColor Cyan

# Direct Graph Authentication and Ingestion
& Get-WindowsAutoPilotInfo.ps1 -Online -GroupTag $GroupTag -AssignedUser $AssignedUser -Assign

Write-Host ">>> [4/4] Hardware Hash successfully uploaded to tenant with GroupTag: $GroupTag" -ForegroundColor Green
Remove-Item -Path $tempPath -Recurse -Force

Enterprise GroupTag Architecture & Dynamic Entra ID Assignment

Uploading hardware hashes is only half the battle. To ensure the correct Enrollment Status Page (ESP) and configuration baselines apply immediately upon reset, you must establish an intentional GroupTag taxonomy.

GroupTag Value Target Persona / Hardware Autopilot Join Type Dynamic Entra ID Query Filter
Corp-Dev Engineering & DevOps Workstations Entra ID Joined (User-Driven) (device.devicePhysicalIds -any _ -eq "[OrderID]:Corp-Dev")
Corp-VIP Executives & C-Level Laptops Entra ID Joined (White-Glove / Pre-Prov) (device.devicePhysicalIds -any _ -eq "[OrderID]:Corp-VIP")
Kiosk-Shared Frontline & Shared Warehouse PCs Self-Deploying Mode (device.devicePhysicalIds -any _ -eq "[OrderID]:Kiosk-Shared")
GCCH-Gov Sovereign Cloud & High Compliance Entra ID Joined (DoD/FedRAMP) (device.devicePhysicalIds -any _ -eq "[OrderID]:GCCH-Gov")

Common Troubleshooting & Production Gotchas

1. Duplicate Hardware Hashes on Cloned Virtual Machines If capturing hardware hashes on Hyper-V or VMware templates, ensure the VM is generalized with sysprep /generalize /oobe before extraction. Cloning a running VM produces identical motherboard UUIDs, causing Autopilot registration collisions and error 80070032.
2. Existing Stale Intune Object vs Autopilot Device Identity When wiping a machine that was converted to Autopilot, never delete the Autopilot Device record from Enrollment > Devices. If you delete the Autopilot record, the machine reverts to an unmanaged consumer OOBE screen. Only delete the MDM Intune device object under All Devices if performing a clean re-enrollment.
3. Motherboard RMA & Hardware Replacement When a laptop undergoes a motherboard swap at a certified repair center, the hardware hash changes completely. The old Autopilot record must be deregistered via PowerShell or Intune Admin Center, and the new motherboard hash must be harvested upon return from the vendor.

Summary & Implementation Checklist for Engineers

  1. Audit Existing Fleet: Inventory all active endpoints across SCCM, Intune, and Active Directory.
  2. Standardize GroupTags: Establish your corporate naming convention (e.g. [OrderID]:Corp-Laptop) for dynamic profile mapping.
  3. Enable Background Conversion: Activate "Convert all targeted devices" on your primary Windows 11 Autopilot deployment profile.
  4. Deploy Remediation Scripts: For hybrid/workgroup devices, execute the Graph API harvesting script via Intune Proactive Remediations.
  5. Validate Profile Assignment: Ensure the Autopilot Profile Status reads Assigned before scheduling user device refreshes.
💡 Engineering Field Note Converting existing devices to Autopilot eliminates hundreds of hours of manual IT staging during corporate hardware refresh cycles. By seeding the Autopilot cloud database while devices are in the hands of active workers, your next OS upgrade or device reset becomes a completely hands-off, zero-touch experience.

Was this article helpful?

🎓 Ready to go deeper?

Practice real MD-102 exam questions, get AI feedback on your weak areas, and fast-track your Intune certification.

Start Free Practice → Book a Session
Souhaiel Morhag
Souhaiel Morhag
Microsoft Endpoint & Modern Workplace Engineer

Souhaiel Morhag is a Microsoft Intune and endpoint management specialist with hands-on experience deploying and securing enterprise environments across Microsoft 365. He founded MSEndpoint.com to share practical, real-world guides for IT admins navigating Microsoft technologies — and built the MSEndpoint Academy at app.msendpoint.com/academy, a dedicated learning platform for professionals preparing for the MD-102 (Microsoft 365 Endpoint Administrator) certification. Through in-depth articles and AI-powered practice exams, Souhaiel helps IT teams move faster and certify with confidence.

Related Articles

Popular on MSEndpoint