How to Create a Domain and a Domain Controller in a Windows Server 2019 Virtual Machine

Yasith Kumara
5 min readSep 24, 2021

This is a step by step guide for creating a domain and a domain controller in windows server 2019 Virtual Machine.

For you to follow the guide you must have a windows server 2019 installation with you. But if you only have a Windows 10 installation, Do not worry. Click here to navigate to another article written by me on installation of Windows Server 2019 as a virtual machine on Windows 10.

I will break the process into simpler steps and link them nicely to make it easier for you to jump into your desired step easily.

The steps include,

Making host IP static

Making Domain Controller IP static

Creating a Domain and Domain Controller.

Making host IP static

First of all type ‘ipconfig /all’ on a command prompt and in the virtual switch, note down the IP address of the Default Gateway . Mine was 192.168.8.1.Then we should make our IP address in the host machine static.

  1. Go to, Control Panel > All Control Panel Items > Network Connections.
  2. Select the virtual switch you have created.
  3. Go to its ‘Properties’.
  4. Click ‘Internet Protocol Version 4…’ to edit Internet Protocol Version 4 Properties.
  5. Edit IPv4 Properties. Input an IP address in same range as the Default Gateway. Subnet mask would be filled automatically. Use the above noted Default Gateway as the Default Gateway. Use a DNS of your preference for now. Click OK to save.

Making Domain Controller IP static

By default, Server Manager will open automatically.

  1. Select ‘Local Server’ from the tree view on the left.
  2. Click the ‘IPv4 address assigned by DHCP..’ link. you will be navigated to the network connections window.
  3. Open the enabled network connection. This is the network connection from the virtual switch.
  4. Go to its ‘Properties’.
  5. Click ‘Internet Protocol Version 4…’ to edit Internet Protocol Version 4 Properties.
  6. Edit IPv4 Properties. Input an address in the same range as the IP address we used earlier for the host machine. Subnet mask would be filled automatically. Input the above noted Default Gateway as the Default Gateway. Use 127.0.0.1(itself) as the DNS first option. Use a DNS of your preference as the second option. Click OK to save.

Creating a Domain and Domain Controller

  1. Click ‘Manage -> Add Roles and Features’ in the toolbar to open ‘Add Roles and Features Wizard’ window.

2. Click ‘Next’.

3. Select ‘Role-based or feature-based installation’ and click ‘Next’.

4. Select ‘Select a server from the server pool’. In the server pool, select our server and then click ‘Next’.

5. From Roles, Click the box next to ‘Active Directory Domain Services’ and you will be prompted with a window. Make sure the ‘Include management tools’ is checked and Click ‘Add Features’.

6. Click ‘Next’.

7. Click ‘Next’ again.

8. Put a check-mark on the ‘Restart the destination server automatically if required’ option and click ‘Next’.

9. Wait for the feature installation to complete and then click ‘Close’.

10. After successful installation of the feature, a warning flag will appear in the toolbar. Click on it to reveal the notification on ‘Post-deployment configuration’. In there, Click ‘Promote this server to a domain controller’.

11. Then Active Directory Domain Services configuration Wizard window will be opened. Select the ‘Add a new forest’ option as the deployment operation. Choose a Root domain name of your choice. It must have at least two words and a ‘.’ separating those. Then click ‘Next’.

12. Select Windows Server 2016 as the Forest functional level and Domain functional level. Put a check-mark before the Domain Name System(DNS) server. Choose a strong password as the Directory Services Restore Mode password because this will be an administrative password. Then click Next.

13. Click Next on the DNS Options view. Ignore the warning message for now.

14. Your NetBIOS domain name will load now. It has a 15 character limit. Verify it and click Next.

15. Click Next.

16. Review a summary of your selections and click Next if OK.

17 . If you see a ‘All prerequisite checks passed successfully’ message Click Install.

Congratulations. You can see that you have a domain. In the ‘Local server’ pane, you can see the name of your domain next to ‘Domain’.

--

--