I have written a couple of posts which describe add Autopilot devices to Intune. The feedback that I got was that it might be easier for some people to include a menu to add group tags. I have created a script which builds a menu where you can choose a group tag for your autopilot devices. Furthermore, this group tag can be used later on in Microsoft Intune/Endpoint Manager.


You have to be an administrator on the machine where you run the script.


Firstly, save the script as a “.ps1” file. The script syntax is at the bottom of the page.

Then change these values accordingly:

After that, run the “.ps1” file.

For example:

Autopilot devices menu script run

After that, this dialog box pops up:

Choose a type of device. For the demo I choose “Personal Device” and click on “OK”

This is the output. Please log on with your Microsoft Endpoint Manager Administrator account:

This the result, the group tag personal added:

From the portal perspective:

And that is how you create a script with a menu to upload your Autopilot Devices with a group tag!

Script Syntax



Microsoft Docs about Powershell menu

Other posts:
Powershell function for creating WVD hostpools
General Information about Hostpools

Related Posts

4 thoughts on “Autopilot Devices Script Menu

Leave a Reply

Your email address will not be published. Required fields are marked *