AnilG.anilgtech.com Join next batch

Labs Windows Autopilot

Windows Autopilot lab: zero-touch Windows 11 on a Hyper-V VM

Register a VM's hardware hash once, and its first boot goes straight to your branded sign-in page, joins Microsoft Entra ID, enrols in Intune and lands on a managed desktop. No imaging, no USB sticks, no IT hands on the device.

Time ~90 minutes Cost €0 extra with M365 E3 / Business Premium Level Beginner–Intermediate Updated 11 Nov 2026

What you'll build

  • A Windows 11 VM that boots to your company's branded sign-in page instead of standard Windows setup.
  • The user signs in once; the device joins Entra ID and enrols in Intune by itself, then shows the Enrollment Status Page.
  • A Hyper-V checkpoint lets you replay the whole zero-touch demo in minutes, perfect for training.
ItemWhat you needCost
Intune + Entra ID P1Microsoft 365 E3, E5 or Business Premium (a trial works for a short lab)0 extra
Hyper-VBuilt into Windows 10/11 Pro, Enterprise or Education0
Windows 11 mediaWindows 11 Enterprise evaluation ISO or Pro ISO0

The lab uses user-driven mode with Microsoft Entra join. Self-deploying mode doesn't work on virtual machines, including Hyper-V virtual TPMs (Microsoft Learn).

The lab in 60 seconds

How it works

Register a device once, and its first boot lands on a managed desktop Windows Autopilot, user-driven mode with Microsoft Entra join Hardware hashPowerShell at setup Autopilot servicedevice registered Dynamic groupgroup tag Training Deployment profileuser-driven, Entra Branded sign-inuser signs in Entra + Intunejoin and enrol Status page (ESP)apps and policies Managed desktopready to work first boot

You do the top row once, as the admin. The bottom row happens by itself the first time the device boots: the user only picks a region and signs in.

Prerequisites and licences

RequirementWhyHow to check
Microsoft 365 E3/E5/Business Premium, or Entra ID P1 + Intune (licensing)Automatic MDM enrolment and company brandingAdmin center > Billing > Licenses
Licence assigned to the test userUsers need a licence to enrol devicesAdmin center > Users > Active users
Automatic enrolment: MDM user scope = All (or a group)The device enrols in Intune when it joins EntraIntune > Devices > Enrollment > Windows > Automatic Enrollment
Users may join devices to Microsoft EntraThe first user who signs in joins the deviceEntra > Devices > Device settings
Intune Administrator role for youTo register devices and create profilesEntra > Roles and administrators
Hyper-V host: Windows 10/11 Pro or Enterprise, 8 GB+ RAM, virtualisation onRuns the lab VMTurn Windows features on or off > Hyper-V
Windows 11 ISOInstalls the VM up to the first setup screenMicrosoft Evaluation Center or Visual Studio downloads

Company branding is optional but recommended: the square logo, sign-in page text and tenant name are what users see during Autopilot (Microsoft Learn).

Phase 1 · 15 min

Tenant preparation

  1. Automatic enrolment. Intune admin center > Devices > Enrollment > Windows > Automatic Enrollment: MDM user scope = All > Save.
  2. Device join. Entra admin center > Devices > Device settings: Users may join devices to Microsoft Entra = All; keep the device limit at 20 or more for a lab.
  3. Company branding. Entra admin center > User experiences > Company branding > Default sign-in > Edit: add a square logo, sign-in page text (for example Welcome to Contoso. Sign in with your work account.) and a username hint [email protected].
  4. Enrollment restrictions. Intune > Devices > Enrollment > Device platform restrictions > Windows: confirm MDM = Allow and no minimum/maximum OS version that blocks Windows 11.
  5. Test user. Create [email protected] and assign a Microsoft 365 E3 (or Business Premium) licence.

Phase 2 · 20 min

Group, deployment profile and Enrollment Status Page

Dynamic device group. Entra admin center > Groups > New group: Security, name Autopilot-Lab-Devices, membership Dynamic Device, rule:

(device.devicePhysicalIds -any (_ -eq "[OrderID]:Training"))

The rule matches only devices registered with the group tag Training, so the lab never touches production devices. To catch every Autopilot device instead:

(device.devicePhysicalIDs -any (_ -startsWith "[ZTDid]"))

Deployment profile. Intune > Devices > Enrollment > Windows > Windows Autopilot > Deployment profiles > Create > Windows PC:

SettingLab value
NameAutopilot User Driven Entra Join
Convert all targeted devices to AutopilotNo
Deployment modeUser-Driven
Join to Microsoft Entra ID asMicrosoft Entra joined
License terms / Privacy settings / Change account optionsHide / Hide / Hide
User account typeStandard
Allow pre-provisioned deploymentNo
Apply device name templateYes: LAB-%RAND:5% (15 characters maximum)
AssignmentsAutopilot-Lab-Devices

Enrollment Status Page. Intune > Devices > Enrollment > Windows > Enrollment Status Page > Create: show app and profile progress = Yes, timeout 60 minutes, allow reset on error = Yes, allow use if error = Yes, block device use until required apps install = Selected (none for a first demo). Assign to Autopilot-Lab-Devices.

Phase 3 · 20 min

Build the Hyper-V VM

Windows 11 needs a Generation 2 VM with Secure Boot and a virtual TPM. Run this in an elevated PowerShell on the Hyper-V host (change the ISO path first):

$vm  = "AP-LAB-01"
$iso = "C:\ISO\Win11.iso"
New-VM -Name $vm -Generation 2 -MemoryStartupBytes 4GB -NewVHDPath "C:\Hyper-V\$vm.vhdx" -NewVHDSizeBytes 80GB -SwitchName "Default Switch"
Set-VMProcessor -VMName $vm -Count 2
Set-VMMemory -VMName $vm -DynamicMemoryEnabled $false
Set-VMKeyProtector -VMName $vm -NewLocalKeyProtector
Enable-VMTPM -VMName $vm
Add-VMDvdDrive -VMName $vm -Path $iso
Set-VMFirmware -VMName $vm -FirstBootDevice (Get-VMDvdDrive -VMName $vm)
Set-VM -Name $vm -AutomaticCheckpointsEnabled $false
Start-VM -Name $vm
  1. Connect to the VM and press a key to boot from the ISO.
  2. Install Windows 11 (Pro or Enterprise). Choose I don't have a product key if asked.
  3. Stop at the first setup screen (region selection). Don't click through it: this is where Autopilot takes over.

Phase 4 · 15 min

Register the hardware hash

Option A: upload straight from the VM (recommended). At the region screen press Shift + F10, type powershell, then run Microsoft's documented commands (Microsoft Learn):

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Install-Script -Name Get-WindowsAutopilotInfo -Force
Get-WindowsAutopilotInfo -Online -GroupTag "Training"

Agree to install NuGet if prompted, then sign in with an Intune Administrator account. The first run asks you to approve the script's Microsoft Graph permissions.

Option B: save a CSV and import it. Replace the last line with the command below, copy the file off the VM, then Intune > Devices > Enrollment > Windows > Windows Autopilot > Devices > Import.

Get-WindowsAutopilotInfo -OutputFile C:\HWID\AutopilotHWID.csv
Never open the CSV in Excel. Edit it only in Notepad; a file saved by Excel won't import.
  1. Intune > Windows Autopilot > Devices > Sync: the VM's serial number appears with group tag Training.
  2. Wait until Profile status = Assigned (usually 5–15 minutes while the dynamic group updates).
  3. In Hyper-V Manager, take a checkpoint named OOBE - Autopilot ready, so you can re-run the demo in seconds.

Phase 5 · 15 min

Run the zero-touch demo and verify

  1. In the VM's PowerShell window, restart: shutdown /r /t 0.
  2. Choose region and keyboard. After the network check, the branded sign-in page appears with your logo and Welcome to Contoso text.
  3. Sign in as [email protected] and complete MFA if asked.
  4. The Enrollment Status Page runs: Device preparation, Device setup, Account setup.
  5. The desktop appears: the device is joined and managed.

On Windows 11, press Ctrl + Shift + D during setup to open the Autopilot diagnostics page if anything stalls. Your ticks are saved in this browser only.

Re-running the lab and troubleshooting

Run the demo again: delete the device from Intune > Devices > All devices (keep the Autopilot registration), then apply the checkpoint OOBE - Autopilot ready and restart the VM. Don't delete the Entra device object that Autopilot created at registration; Autopilot needs it to identify the device (Microsoft Learn).

SymptomLikely causeFix
Standard Windows setup, no branded sign-inProfile not assigned before setup startedCheck Profile status = Assigned, then apply the checkpoint (or reset the VM) and restart
Profile status stays Not assignedDevice not in the dynamic groupCheck the group tag is exactly Training and the rule text; wait 15 minutes; Sync
Error 0x80180014 at sign-inEnrolment blocked, often by a platform restriction or an old device recordAllow Windows MDM in enrolment restrictions; delete the old Intune device record
This PC can't run Windows 11VM is Generation 1, or TPM / Secure Boot offRebuild as Generation 2 with Enable-VMTPM
CSV import failsFile edited in Excel, extra columns or quotesRe-export with the script; edit only in Notepad
Enrollment Status Page times outToo many blocking apps for a slow VMBlock on Selected apps only, or raise the timeout
Self-deploying mode fails with 0x800705B4Not supported on VMs, including Hyper-V virtual TPMUse user-driven mode for VM labs

Adapting this lab to your tenant

Example in this guideReplace with
contoso.com, [email protected]Your domain and a licensed test user
Group tag TrainingAny tag you like; keep the group rule in sync
Autopilot-Lab-Devices, profile and ESP namesYour naming convention
Device name template LAB-%RAND:5%Your prefix (15 characters maximum)
AP-LAB-01, C:\ISO\Win11.iso, C:\Hyper-VYour VM name and paths

Registering devices yourself with a hardware hash is meant for testing and small numbers; in production, the manufacturer or reseller registers devices for you (Microsoft Learn). Sources checked 11 Nov 2026.

Want to build this live, with help?

This lab is part of my hands-on Intune and Windows Autopilot training. Small batches, live online, real tenant.