Before you start
Objectives: Learn how to enable the Remote Desktop on Windows Server 2012 on the full GUI version and on the Core version.
Prerequisites: no prerequisites.
Key terms: remote, desktop, server, Windows, core, version, command, cscript, GUI, 2012
When we power on our Windows Server 2012 machine, we will be presented with the Dashboard. We have to go to the Local Server on the menu on the left.
Local Server Option
Notice that currently the “Remote management” feature is enabled.This enables applications or commands that require Windows Management Instrumentation (WMI) and Windows PowerShell remote access to manage this server. Also notice that the Remote Desktop feature is disabled by default. Let’s click on the “Disabled” option. The Remote tab on the System Properties window will appear. Here we have to select the “Allow remote connections to this computer” option.
Remote Desktop Allowed
When we do that the Remote Desktop Firewall exception will be automatically enabled. We can always fine tune this rule by using Windows Firewall with Advanced Security. For example, we can enable this exception for only selected networks or network connections.
Option to Add Remote Desktop Users
We can also select which users will be able to use Remote Desktop by clicking on the Select Users button. Administrator already has access, but we can add other users here as well. When we confirm our settings, we will be able to connect to our computer by using Remote Desktop. This is how we can enable it in the GUI, but what if we use the Core version of Windows Server 2012?
Core version of Windows Server 2012 only comes with the command line tool, there is no GUI. In order to enable Remote Desktop we will use the “cscript” commandlet. Cscript allows us to interact certain scripts on Windows. When we power on our Core machine, we will see a CMD window. First we will make sure that we are in the C:\Windows\System32\ folder. From here we will use the scregedit.ws script together with few switches. First we will check current settings for Remote Desktop, and to do that we will enter the command: “cscript scregedit.wfs /AR /v“. The /v switch means that we want to view current setting.
View Current Configuration
As we can see in our case, the current value for the Terminal Server Deny setting is “1”, which basically means that this machine will deny all Remote Desktop connections. In order to allow Remote Desktop, we have to change that value to “0”, and to do that we will use the command: “cscript scregedit.wfs /AR 0“.
Once the command is executed we can run the first command again to make sure that the setting is changed. At this point we can connect to this Core machine by using Remote Desktop. This is just one way to do it. We could also use the Server Manager remotely to do the same thing.