How to properly deploy Remote Desktop Services in a workgroup

I have previously written an article on setting up RDS (Remote Desktop Services) in domain environment.  However, what if there is only one server and/or there is no domain?  It is still possible to setup RDS, but the process is a little different.  Connection broker, a component of RDS, does not work properly in a workgroup environment.  Also it is not possible to use Remote App, another component of RDS, or create a session collection.  Without a session collection, Session Host, yet another RDS component, will not be able to obtain licenses. Without licenses RDS will cease to function after the initial grace period.  Typically this is 120 days. We get around this by manually editing the WMI attributes for Session Host.

Here is how to properly deploy RDS in a workgroup.  I am going to use PowerShell to make this quick and easy.  This guide is applicable for Windows 2012, 2012R2 and 2016 in a single server workgroup environment.  If you have Windows Server 2019 or higher the process has changed.  Skip to the bottom for that process.

  1. Launch a Windows PowerShell using the Run as Administrator option.
  2. Run the following command to install the RDS components that are required. (This will automatically restart the server)
    Install-WindowsFeature RDS-RD-Server,RDS-Licensing -IncludeManagementTools -Restart
  3. After the server restarts, log back in.
  4.  Launch a Windows PowerShell using the Run as Administrator option.
  5. Run the following commands to manually configure Session Host*.
    • $obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
    • $obj.ChangeMode(2)
    • $obj.SetSpecifiedLicenseServerList($env:computername)

The next step is to activate the RDS license server and install RDS CALs.  You can find an article on how to do that here.

* On the $obj.ChangeMode() command:
$obj.ChangeMode(4) = Per User licensing
$obj.ChangeMode(2) = Per Device licensing (supported mode for workgroups)

An update to this article.  It appears in Windows Server 2016 and 2019 Microsoft is enforcing Per Device mode in a workgroup configuration.  So if you install RDS in a workgroup in 2016 or 2019, you should use Per Device mode.  This is not usually an issue as RDS CALs can be converted between Per User and Per Device in the licensing manager.

Another update, July 2021.   Microsoft has changed the process for Windows Server 2019.  The above PowerShell script will fail to set the mode.  To properly do this the registry needs to be edited.

  1. Open Registry editor (Right-click Windows logo at the bottom left and choose Run.  Type regedit and hit enter.)
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core
  3. Verify there is a DWORD for “LicensingMode” and it is set to 2.  If not present, right-click and choose New-> DWORD (32-bit) Value.  This must be set to 2 for “Per Device”
  4. Navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers
  5. Verify there is a Multi-String for “SpecifiedLicenseServers” and it is set to the server’s name.  If not preset, right-click and choose New->Multi-String Value.  
  6. Reboot the server.

3 thoughts on “How to properly deploy Remote Desktop Services in a workgroup

Leave a Reply to Mustafa Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s