Creating virtual machines
Create two virtual machines following instructions.
In this instruction, the virtual machine (VM) of the domain controller will be called DC1 and the terminal server VM will be called TERM1.
Installing Active Directory roles and components
In Server Manager select "Add roles and components". The Roles and Components Wizard will start.
Select the installation type "Installing roles and components".
To install the roles, choose by name our server DC1.
In our example, the domain controller is the first and only one, so choose "DNS Server" and "Active Directory Domain Services" from the roles. When selecting roles, the wizard will offer to install the necessary components for domain services and DNS-server. Agree and click "Next".
Skip selection of additional components and information messages.
Confirm the components installation (" Install" button) and wait until the installation is finished.
Configuring Active Directory components
After installing the required roles and components, you must configure the domain controller.
You can go to the Domain Configuration Wizard by clicking the link on the installation progress page, or from the Server Manager via "Notifications".
Choose a deployment operation. We deploy a new domain, so select "Add new forest" and set the name of the root domain.
Set a password for the Directory Services Recovery Mode
Ignore the message that it is impossible to create DNS server delegation.
Leave the proposed NetBIOS domain name and default paths.
Before setting up, you can check the selected parameters again.
Make sure that the readiness check has passed. Click "Install".
When the setup is complete, the system will automatically reboot.
After restarting, login to the domain administrator account, the domain administrator password will be the same as the local administrator password, which can be seen in the VM properties.
Installation of terminal server components
First, you need to enter the future terminal server into the previously deployed domain.
In the properties of network connections, check that the IP address of the domain controller is specified as the primary DNS server.
In Server Manager, on the Local Server tab, click on the name of the workgroup. By default, this is WORKGROUP.
The system properties will open. Click "Edit".
In the opened window, select "Is a member"-"domain" and enter the name of our domain.
To join the domain, enter user credentials with domain administrator rights.
After joining the server to the domain, restart and perform all further actions under the domain administrator account.
In the Add Roles and Components Wizard, select the installation type "Installing Remote Desktop Services".
The deployment type is "Quick Start".
Deployment scenario - "Deploy desktops based on sessions"
Select the local server TERM1 for installation, allow automatic restart and give the command "Deploy".
A window will open, where you can monitor the progress of components installation. During the installation process, the components will be restarted. Also do not pay attention to the message about the licensing period, further we will configure the licensing server for remote desktops.
After successful installation of the components, you should install the remote desktop licensing server.
In the Add Roles and Components Wizard, select the installation type "Installing Roles and Components". In the "Remote Desktop Services" drop-down menu, select "Licensing Remote Desktops" and confirm the installation of the components for the selected services.
Accept the installation of components.
Configuring the terminal server components
To work with the terminal server, you need to configure the licensing of remote desktops. In Server Manager, go to the menu "Tools" - "Remote Desktop Services" - "Remote Desktop Licensing Manager".
In the context menu of the server select the item "Verify setup". In the settings click "Add to group".
Also check the detection area "Domain". If this is not the case, go to "Change area" and select "This domain".
Next, you need to configure the licensing mode.
Open the local group policy editor gpedit.msc and go to the following path: "Computer Configuration" -> "Administrative Templates" -> "Windows Components" -> "Remote Desktop Services" -> "Remote Desktop Session Hub" -> "Licensing".
Change the following policy settings:
"Use the specified licensing servers for remote desktops" -> "Enabled", in the field "Use license servers" you need to specify the name of the licensing server - in our case, this is term1.example.org.
"Specify remote desktop licensing mode" -> "Enabled", in the "Specify licensing mode for remote desktop session node server" field select the "To device" or "To user" mode according to the purchased licenses.
Next, you need to activate the licensing server.
In Server Manager, go to the menu "Tools" - "Remote Desktop Services" - "Remote Desktop Licensing Manager". In the context menu of our server select "Activate server".
The Activation Wizard will open. Choose "Connection Method" - "Auto", for this purpose you need to provide the terminal server access to the Internet. If there is no such possibility - choose "Web browser" or "Phone". Then we follow the instructions of the activation wizard and specify the actual data about the user.
If everything is done correctly, the server will receive the status "Activated". After that, the terminal server is installed and ready to work.