Automating the process of configuring an Azure VM as a standalone domain controller

Copper Contributor

We have deployed an Azure virtual machine with Windows Server 2019 Datacenter and our apps installed on it to provide a cloud solution of our apps to clients. The virtual server is configured as a standalone (or isolated) domain controller (DC) as well and domain users have been created as well. All the related configurations have been done.


This is working well for our the client. We are now intending to publish this solution to Azure Common Marketplace - that is, publish Azure VM image. The challenging part is to automate the process of creating and configuring a standalone DC, because DC names will be variable. The following are the objectives:


1. To create some sort of scripts that let customers input the name of a standalone DC and therefore, add and configure DC roles and its features automatically.
2. Publish the scrips (mentioned in 1) along with our Azure VM image with our apps pre-installed on it.
3. A customer would be able to run the scripts after getting our image and scripts from Azure commercial marketplace.
4. A customer can then add domain users or contact us to use our support service in creating domain users and adding them to "Remote Desktop Users" group including all the required configurations.

I hope, the above makes sense?

I am aware that the alternative is to have an Azure VM deployed as Azure Active Directory (AAD) enabled, create a generalised image using sysprep and publish it to Azure commercial marketplace. With this approach, customers can sign in to Azure VM with their Azure AD accounts, if I have got it right.

The reason, why we are pursuing for the method of publishing VM image used as a standalone DC because, we have already deployed a VM for a client, which is live and working well for the client and we are familiar with this method now.

Could someone please refer to documentation and/or advise to help us in automating the process of creating and configuring an Azure VM as a standalone DC?


Best regards,

Misbah

1 Reply