Tech - Setup Autopilot VM

Tech - Setup Autopilot VM

So I've been doing a lot at the moment with Intune and Autopilot.

Normally I can get hold of a laptop to add to Intune but I needed a faster way to revert changes and then retest.

Using Proxmox before I start the install process I've made some changes to the SMBIOS to ensure that I can add the VM to Intune.

The UUID should be already added but the important thing to add is a serial.

You can see here I've made a general serial 'SMC129'

If you don't do this when adding the VM into Intune this will fail.

Start to install Windows 11(23H2)

Once you've started the installation do not answer any questions on the OOBE.

Note: If you want to change the serial number of MULTIPLE of these VMs you will at this stage need to take a snapshot.

I shutdown the VM once the 1st stage of the install had happened took a clone and made a template of this VM. Meaning that if I needed to I could make a clone and then change the serial number (outlined above)

DO NOT PRESS 'YES'

Press Shift + F10 to open Command Prompt.

Execute:

PowerShell.exe -ExecutionPolicy Bypass

At the top of the Command Prompt window that the Execution Policy has been set to Bypass.

Time to install WindowsAutopilotInfo

Execute:

Install-Script -name Get-WindowsAutopilotInfo -Force

Note: if you hit any issues with attempting to grab the script, it's more than likely that your not connected to the internet.

Execute:

Get-WindowsAutopilotInfo -Online

At this stage sign in as an administrator of your Tenant.

Once you have signed in you can see that the device is waiting to be imported.

Perfect imported and in the portal we can see the device.

Now before we shut down the VM we have to sysprep the machine.

Change directory into sysprep.

Then execute:

.\sysprep.exe /Generalize /oobe -shutdown

Once shutdown, take a snapshot.

Start that mother backup.

After a reboot, it's ready for you to start.