Since a while we’re waiting for this change in Windows Autopilot. We can now edit and change the Group Tag and Computer Name filed within the UI or trough PowerShell. This is part of the Intune release 1911 (November 2019).
Open the Device management portal: devicemanagement.microsoft.com
Navigate to Devices – Device enrollment – Windows enrollment – Devices and select the device you like to rename. The option blade now allows you to change both entries, Device Name and Group Tag.
This is very useful for doing changes on the device or assign a different Autopilot profile. If you use dynamic groups, the device will automatically be reassigned to the new Profile as long you have a dynamic group which is queering the new Group Tag.
Also, a new PowerShell module was published by Michael Niehaus to edit and change those values. Make sure you upgrade to the latest version (at least version 3.9).
Update-Module -Name WindowsAutoPilotIntune -RequiredVersion 3.9
Use Set-AutoPilotDevice to rename the device or change the Group Tag after you have connected to MS Graph using Connect-MSGraph. Here is an example of the command:
Set-AutoPilotDevice -id 8afc147f-8893-441b-a47d-3c0f3652c1a4 -groupTag "PartnerCtrRegistered-AP" -ComputerName MasterWayne
Force a sync of the Autopilot service to see the changes or wait until the service has synced. You’re all set now. Enjoy!