Autopilot Deployed Devices Lose ZTDID After Rename

Copper Contributor

Hi all,

So we have been trialing Intune and have noticed that after devices are renamed (done via deployed script post build) they lose the ZTDID attribute and as such fall out of some dynamic collections that require that for membership.

Is there a better way of automating the rename? wondering if the request needs to be seen as coming from Azure as opposed to from the device, possibly via Graph API.

Wondered if anyone had already seen\overcome this rather than me reinventing the wheel as it where.

Thanks

6 Replies
Renaming devices in the Endpoint Manager portal or using scripts (rename-computer) shouldn't let the machine loose it's ZTDID attribute.. Are you renaming Hybrid Azure AD machines perhaps?
Hey, nope these are purely Intune Autopilot built Azure Domain Joined devices, built from a user driven deployment, all shows as expected in Azure but post rename the ZTDID is gone and even the Azure Icon for the device shows as a standard device (blue one) as opposed to the Autopilot one (purpleish) even if I then rebuild that device it doesn't re-populate the ZTDID, I imagine I'd need to completely remove it from Azure and rebuild for that to happen
But how do you rename them? I've renamed machines in the past to a name matching the Assettag using rename-computer without any problem and without loosing the ZTDID...
Windows app (Win32) packaged PowerShell script that uses rename-computer after it compiles the details of our naming convention, all run under System

And renaming them from https://endpoint.microsoft.com/#blade/Microsoft_Intune_DeviceSettings/DevicesMenu/mDMDevicesPreview (Perhaps using Bulk Device Actions) does work without loosing the ZTDID? And they are still visible in https://endpoint.microsoft.com/#blade/Microsoft_Intune_Enrollment/AutoPilotDevicesBlade ?