Virtual Machine can't be joined to Azure AD after Sysprep

John_1989AK 1 Reputation point
2022-07-20T14:53:01.497+00:00

Hi All,

Need your expert advise.

I have a Windows Virtual Machine image prepared with Sysprep. The image has setupcomplete.cmd where provisioning package (ppkg) does Azure AD domain enrollment. It works fine for laptop or desktop system, but not for VM. When I deploy the Sysprep-image with this provisionong package, Azure AD detects it as one machine. Whatever VMs are deployed, Azure AD see it as one the same machine, seems some GUID or SID not resets during Sysprep. But no any issues for physical Active Directory. The issue only for Azure AD.

I found this:

https://learn.microsoft.com/en-us/azure/active-directory/devices/azureadjoin-plan#understand-your-provisioning-options

Azure AD joined devices can’t be deployed using System Preparation Tool (Sysprep) or similar imaging tools.

Are there any ways to fix it? Sysprep is needed to generalize the image, so what other options are available?
Please note that the question not related with Azure VMs, I use local VM under Hyper-V, VirtualBox, Parallels Desktop for Mac etc., and want to find a way to get it joined to Azure AD.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,788 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.