Browse
 
Tools
Categories

Remote Desktop Services ( RDP ) How To's ( Terminal Server )

Author: Steve Childs Reference Number: AA-01810 Created: 2011-11-14 11:43 Last Updated: 2021-07-20 12:00 0 Rating/ Voters

Remote Desktop Administration and Management

How to open the Remote Desktop Connection app (without using a desktop shortcut icon)

  • Windows XP
    • Start > Run > MSTSC.exe
    • Or, Start > Programs > Accessories > Communications > Remote Desktop Connection
  • Windows Vista
    • Start > In the Search box type: mstsc.exe > then press Enter
    • Or, Start > All Programs > Accessories > Remote Desktop Connect
  • Windows 7
    • Start > In the Search box type: mstsc.exe > then press Enter
    • Or, Start > All Programs > Accessories > Remote Deskop Connection
  • Windows 8
    • Position mouse in bottom left hand corner of screen > then right-click > then click run > then type mstsc.exe
    • Or, Position mouse in bottom left hand corner of screen > then right-click > then click Search > then type Remote Desktop > then click on the Remote Desktop Connection app on the left.

Creating an Icon ( for Terminal Server Session ) on users PC Desktop

  • Open the Remote Desktop by browsing to Start > All Programs > Accessories > Remote Desktop Connection (right click and select Sent To > Desktop Create Short-Cut)
    • Or (on Vista or Windows 7) click Start, then in the search box type mstsc.exe, then then you see mstsc.exe in the list right click and drag it to your desktop
    • Or, browse to MSTSC.exe in the C:\Windows\System32 directory, right click, Sent To >  Desktop Create Short-Cut
  • On the login screen, click on the Option button (to expand the app).
  • Click Display (tab) and move the Remote Desktop Size (slider) all the way to the right (to force the session to start in Full Screen mode)
    • NOTE: To increase the 'size' of the FONT displayed on OneSource lower the screen resolution to something like 1024 x 768 on the users PC first.  The Remote Desktop Session trys to inherit the same screen resolution. 
  • Click on the Local Resources (tab) and select Printers (if you want the printer to re-direct to the printer connected to your PC) or un-check it if you want to use the Default Printer assigned to your Remote Desktop Connection.
    • Note: If you want to be able to view 1 or more of your PC drives, then click the More button, then click the + sign next to the Drives, and select each drive that you'd like to be able to view and/or more files to or from (your PC) while in the Terminal Session, and then click OK.
  • On the same Local Resources (tab), in the Keyboard section, select 'On the Local Computer'.
    • Windows 7 or Server 2008: Select On this Computer option.
    • Note: This allows for simple Alt+Tab to flip back to the local PC.
  •  Finally, click on the General (tab) and click Save As...
    • Give the file a logical name, such as OneSource on Server
    • Browse to your Desktop
    • Click Save.
  • To restrict each user to ONE session (highly recommended for data stability)
    • Windows 2003: Start > Control Panel > Administrative Tools > Terminal Services Configuration > Click on Server Settings > (double-click) Restrict each user to one session (make sure the checkbox is checked).
  • To have the server password auto fill (when the icon is double clicked):
    • When you double click the (.RDP) icon that you normally use to login to terminal server, enter your user name and password as usual, but then click the 'Remember my creditials' checkbox.

How to Log-Off a Disconnected User Session

  • If you (the person trying to help) are not logged in with Admin rights, log off and log back on with a user with Admin rights.
  • Right-Click on the taskbar (which is usually at the bottom of your screen).
  • Click Task Manager.
  • Click Users (tab)
  • Right-click on the User that has the problem.  (The 'Status' will usually show 'Disconnected')
  • Click Sign Off. When prompted click 'Sign out user'
  • (Now ask the user to try logging in again).

How to 'Sign-Off' the Server, rather than 'Disconnect' from the Server (for Windows Server 2012/2016)

  • NOTE: It is tempting for a user to CLOSE their session by clicking the X at the top of the screen.  This closes the session from view but does NOT actually log the user off--it just 'Disconnects' the user from the session--and leaves all applications running in memory.  This sometimes causes issues with the data files getting backed up (since the data files are still open) and also sometimes causes 'MSAccess.exe' to get stuck in memory--which prevents the user from logging back on later on.  The solution to these issues is to SIGN OFF instead of Disconnecting.  Please follow the instructions below to Sign off each day when finished working.
  • Right-click the Start button.
  • Click 'Shut down or sign out'
  • Click 'Sign out'  

How to Set a Time Limit (to auto Log-Off a User) for Disconnected Sessions

  • Make sure you are logged into the Windows Server with Admin rights.
  • Right-click on the Start button > Run > type gpedit.msc
  • Navigate to: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits
  • Double-Click 'Set time limit for disconnected sessions'.
  • Click Enabled.
  • In the End a disconnected session (drop down list) select the # of minutes you want the system to wait before automatically ending a disconnected session.   (5 minutes may be a good choice).

How to Open the Terminal Services Manager ( tsadmin )

  • Windows 2003: Start > Run > tsadmin.exe ( or tsadmin )
  • Windows 2008: Start > Run > tsadmin.msc

How to tell which users are logged into the Terminal Server

  • Open tsadmin.
  • Click on the Users tab.
  • In the Users column you will be able to see which users are logged in.
  • In the State column you will be able to see if the user's session is 'active' or 'disconnected', and how long they have been idle (not using the connection).
      

How to tell which users are using which applications

  • Open tsadmin.
  • Click on the Processes tab.
  • Click on the image column (to sort the running application images)
  • Look for the application, such as msaccess.exe
  • In the User column you can see which user is using the application.
  • In the Session and ID columns you can see which terminal server session they are logged into and the exact session ID.

How to re-connect to and close an orphaned Terminal Server Session? 

In some cases, a user will become disconnected from a session, and then when reconnecting at a later time, a new session is created (leaving the earlier session still open).  In this situation, you can follow these steps to reconnect to the session and close the session down properly.  (Closing the session properly reduced the chance of any data or file corruption).

  • Log onto your Windows 2000/2003 Server with a user account with Administrative rights.
  • Open tsadmin.
  • Click on the Sessions tab.
  • If the session show’s a state of Disconnected, you can then either:
    • Logoff the user, which gracefully resets the session by closing down all open apps, including OneSource, and close the session. 
    • Connect to the users session by right-clicking on the session name and selecting Connect (and then entering the users password).
    • Reset the users session (which is typically the last resort, assuming that it does NOT log off all open applications gracefully).

How to log onto server console as an administrator

  • Option 1:
    • Start > Run > type: mstsc /console
    • Logon with a username and password that has Administrative rights.
  • Option 2:
    • Start > Run > type: mstsc /admin
    • Logon with a username and password that has Administrative rights.
  • Option 3:
    • Start > Run > type: mstsc -v:servername -console (where servername is the name of your server)
    • Logon with a username and password that has Administrative rights.

How to Pull Up the Windows Task Manager on Remote Desktop (using short-cut keys)

With the Remote Desktop screen selected, try any of these:

  • Ctrl+Shift+End
  • Ctrl+Shift+ESC
  • Ctrl+F3

Where to find 3rd party print drivers to print to local printers over RDP

How to disable Printer Re-direction WinServ2008 and WinServer2008R2

Problem description:  You may notice that when RDP’ing into the Print Server, you are having print drivers being installed that were installed on the client (workstation or laptop). This could be due to the RDP (RDS/TS) printer redirection being enabled. 

Note:  In Windows Server 2003, if you were running as a Print Server, it was easy to disable print redirection by going to “Administrative Tools > Terminal Services”.  Since Windows Server 2008 and Windows Server 2008 R2, have roles, the MMC to disable Remote Desktop (Terminal Services) print redirection is not installed by default.  And you don’t want to enable the role to disable TS printer redirection. 

Recommendation:

  • GPO or GPEdit.msc (Local policy) 
    • Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Printer Redirection > Do not allow client printer redirection
  • Or, Via the registry key: HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
    • fDisableCpm set to 1

How to set numerous 'DEFAULTS' that over-ride the users mstsc.exe client settings (Windows 2008 R2)

(NOTE: THIS EXAMPLE IS FOR SETTING DEFAULTS FOR PRINTER RE-DIRECTION--TO PREVENT IT).

  • If you have a Terminal Server 2008R2 which is used widely in your company and users need to use printers a lot, than you’ll face this default printer problem later or sooner. You can log on as the user on the terminal server, add the printers you would like and set the default printer like you would do on a normal workstation, but the default printer will change to the local machines default printer automatically. Let’s say you are using “comp1” in order to make a “Remote Desktop” connection to a terminal server which is called “Terminal”. Well, as an example, if you have “XPS Virtual Printer” set as a default printer on “comp1” and you make a remote desktop connection to the “Terminal” server, your default printer will be set to “XPS Virtual Printer” by default in the terminal server session. To avoid that action and keep the same printer as a default printer in terminal server sessions, you will need to follow these instructions;
  • If you want to change the behavior only for one user, then you can; 
    • 1-Open “Active Directory Users and Computers” snap-in with a Microsoft Management Console (mmc.exe)
    • 2-Find the user in your domain hierarchy, right click on the user and choose “Properties” 
    • 3-From the “users Properties” window, go to “Environment” tab, under “Client devices” section, uncheck the “Default to main client printer” option and click “Apply”
  • If you want to change the behavior for all users who logs onto the Terminal Server, then you can;
    • 1-Open the “Remote Desktop Session Host Configuration” from the Terminal server.
    • 2-Under “Connections”, right click on “RDP-tcp” connection and choose “Properties”. 
    • 3-From the “RDP-tcp Properties” window, go to “Client Settings” tab. 
    • 4-Under the section of “Redirection”, check the checkbox “Default to main client printer” option in order to avoid the unwanted changes with the default printers while logging on a Terminal Server 2008 R2.

How to tell how many days are left on the temporary 120 day free Terminal Server / Remote Desktop Services license

  • Start > Run > tlsbln.exe  (tlsbln = terminal license server balloon)


    How to install Terminal Service Licensing Server

        Start > Control Panel > Add Remove Programs > Add/Remove Windows Components > Terminal Server Licensing

            If it asks for a disk, try searching for the LServer.exe in the C:\Windows\System23\DLLCache directory

How to remove the SLOW loading background image

  • Click Start / Run / type REGEDIT and click OK
  • Navigate EXACTLY to the Key Value: HKEY_USERS > DEFAULT > Control Panel > Desktop
  • Locate the String Value:  ?Wallpaper?. 
  • Now, either right-click and delete the Wallpaper string value completely, or change the value to a different wallpaper
    • WARNING – Be sure you DO NOT delete the ?Desktop? Registry Key on the left, only nuke the ?Wallpaper? String Value on the right
  • Close REGEDIT

Changing the Screen Resolution for Remote Desktop Connections

  • Click Start.
  • Click Computer and double click C Drive.
  • In the search box type .rdp
  • The next step is to Right click open the .rdp file with notepad option.
  • Once this file is open you should see the following few words among others:
    • desktopwidth:i:1280
    • desktopheight:i:800
  • Simply adjust to the resolution that you desire and save the file. This should fix your display settings.

Changing Terminal Server Resolution Takes Place at the Local PC


  • You cannot change the resolution while in a terminal server session.
  • The Display tab in the RDP options before you connect is usually set to “Full Screen”.  It can be set to lower resolution sizes than your current PC or Thin Client settings, but not higher.

In order to fix the problem, close the terminal server connection.  Change the resolution size as needed on the local PC or Thin Client, and then reconnect to the terminal server.  The new resolution settings will be passed through automatically if the display settings are still set to “Full Screen”. 

Installing & Configuring RemoteApp

Installing / Configuring RemoteApp

Setting up a Windows 2008 or 2012 server to use RemoteApp allows a user to login to OneSource (or any other RemoteApp) from their PC and use the APP as if they were logged into the Terminal Server.  Put another way, the user does not have to login to a terminal server and then open up OneSource from the server desktop.  (Technically they ARE logging into the Terminal Server, but since it auto opens up the app and wraps the Remote Desktop 'window' tightly around the app it 'Looks' like they are just running a hosted app, over the web).  Another benefit of a RemoteApp is it does a much better job of 'finding' the users local printer, which makes terminal server Printing issues largely resolve themselves..

  • Remote App Setup Checklist: https://technet.microsoft.com/en-us/library/cc731380.aspx
  • Step by Step
    • Server Manager > Roles > Add Roles > Remote Desktop Services (Next) (Next)
    • Check (Click):
      • Remote Desktop Session Host
      • Remote Desktop Licensing
      • Remote Desktop Web Access
        • When Add Roles Wizard pop-up appears click Add Required Role Services
    • Click Next, and then Next
    • Set to Require Network Level Authentication, then Next
    • Per Device (as suggested on a Youtube training video.  I (SBC) favor per user).
    • Select Users (hold control key down to multi select), next
    • Click all 3 checkboxes 
    • Check Configure a discovery scope for this license server, This workgroup (if no Active Directory is installed), or This domain if Active Directory is install (meaning we have a 'Domain'), then click Next
    • On Web Server (IIS) click Next
    • On Select Role Services accept all defaults and then click Next
    • Click Install
    • When prompted to Restart click Close, then Yes (when prompted to restart server now).
    • NOTE: When all done look at the roles.  Look for any warning icons.  Also, make sure any user that needs to access the Remote App (for 2008 and maybe 2012...) are in the TS Web Access Computers USER SECURITY group.

Adding RemoteApps (after completing setup above) (2008 Server)

  • Open Server Manager.
  • On tree on left click Roles> Remote Desktop Services > RemoteApp Manager
  •  Right-click on the table (on the bottom of the screen called RemoteApp Programs) and select Add RemoteApp Programs.
  • Click Next, then select Access (from the list) > Next > Finish.
  • Now right-click on the Access program added to the list to change these properties:
    • Change the RemoteApp program name: OneSource (User1)   (where the User1 is the name of the user you want to give it)
    • Change the Alias setting to: OneSource
    • In the Command-line arguments, change to: Always use the following command-line arguments: "C:\OneSource\TermUsers\OneSource1\OneSource.mdb" (where OneSource1 is the name of the specific OneSource user folder)
    • Click Change Icon button and browse for the Green OneSource icon.
    • Click OK to save.
  • Now again right-click on the Access program added and select 'Create .rdp file':
    • Click Next
    • In the 'Enter the location to save the packages' (browse for, and create folder if necessary, 'C:\OneSource\RemoteApp_RDPFiles"
    • Click the Change button to change the Server Name to the IP address of the server and the Port from 3389 to whatever port we are using.  (Sometimes its 22767, sometimes we use 3390, sometimes we dont change it so it needs to stay at 3389)
    • After the NEW .rdp is created change the name to OneSource (User1)    (where the User1 is the name of the specific user you have created the app for). 
    • Move the new .rdp icon to your PC to test and email to user.

To Activate the Licensing Server

    Start > Administrative Tools > Remote Desktop Services > Remote Desktop Licensing Manager
  • Click on the server in the tree in the left pane.
  • Then right-click, then select Activate Server
  • Then click Next
  • Then leave Automatic Connection (Recommended) selected and then click Next.
  • Fill out info.
  • Click Next, and then Next
  • Select Open License (assuming the typical way we buy/sell licenses)
  • Click Next.
  • Enter Agreement Number and License Number:

RemoteApp How To's

THE ALL IN ONE RemoteApp KBAhttps://technet.microsoft.com/en-us/library/cc730673%28v=ws.10%29.aspx

Configuring Terminal Services TS Web Access for RemoteApps

  • Open the HELP for Microsoft Management Console
  • Click on TS RemoteApp Manager > Terminal Services Web Access (TS Web Access) > Checklist: Make RemoteApp Programs Available Through TS Web Access


Troubleshooting RDP Remote Desktop Connection Problems

Can't Get Connected: Is the user in the Remote Desktop Users security group?

Can't Get Connected: If your server is a Domain Controller (Active Directory is installed) is the 'Allow Log on Through Terminal Services' Rights ( or Allow Log on Through Remote Desktop Services ) enabled?

  • When cannot get logged into Terminal Services, if the 'Active Directory' is Installed.. Check this:
    • Click Start > Run
    • Enter Secpol.msc and press enter.
    • Click Local Policies > User Rights Assignments (dbl click on)
    • In the list on the right, right-click on 'Allow Logon Through Remote Desktop Services'.
      • For Window Server 2008 (R1), right-click 'Allow Logon Through Terminal Services'
    • Add user group(s) that need access - such as Remote Desktop Users).
      • Add user or group..
      • Click on the Advance button.
      • Click on Find Now.
      • In the search results, under name find the group and double click it.
      • Click OK to close all..

Is Remote Desktop traffic allow through your router / firewall and modem?

    • Does your ISP block Remote Desktop Traffic in their modem? (You may have to call your ISP to verify that the problem does not originate there).
    • Check to see if port 3389 has been allowed through your router / firewall.  See this site for more info on how to do this from your router / firewall: www.canyouseeme.org  (Login to this site FROM the server that you are trying to login FROM).

    Terminal Server Licensing - Troubleshooting

    Error Messages / Solutions

    • ERROR: (LEAVE THIS ERROR ON TOP)
      • Trying to log into Terminal Server Session getting login screen but then getting Access Denied error message.  
        • In this situation the customer had a member server (for OneSource) and a Domain Controller (to manage user and network security, etc).  
        • On the member server we opened the Server Manager and clicked on Roles on the left.  We could see that several of the Roles had RED x's on them including: File Services, Network Policy Access Services, and Print and Document Services.  Hyper-V and Remote Desktop Services also had YELLOW exclamation point warning signs.
        • On the Member server Start > Run > CMD > gpupdate /force  (to update the Group Policy security settings).  This failed with a big long error message.
        • We then rebooted the Domain Controller and that fixed the problem.  
    • Error: Your Remote Desktop session has ended. Your network administrator might have ended the connection. Try connecting again, or contact technical support for assistance.  Or, The remote session to the remote computer was ended by means of an administration tool. Your administrator might have ended your connection
    • Error: The remote session was disconnected because there are no remote desktop license servers available to provide a license.
      • See section above:How to log onto server console as an administrator
      • See section above: Terminal Server Licensing - Troubleshooting
      • I turned off the "one connection per user" option in licensing, and this allowed me to connect.
    • Error: When you log onto the remote desktop and get the error "the remote session was disconnected because there are no Remote Desktop client access licenses available for this computer.  Please contact the server administrator.
      • If the login is for administrative purposes then follow these steps:
        • Click Start > Run > mstsc /admin.
        • Then put in all of your normal settings.
        • Note: You can also click 'Save As' to make a permanent (editable) shortcut to the connection.

    Resetting the Grace Period on Windows 2012 R2

    NOTE: These instructions may not be 100% correct as I (SBC) am typing them in after watching Adam do it:

    • Login to server with Admin rights.
    • Open Run > Regedit
    • Navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
    • Then delete the GracePeriod folder.
      • NOTE: If you cannot delete this folder... make sure you are logged in with Admin rights.  If you are and still cannot delete the folder then trying following these steps to CHANGE the ownership of the folder to the Administrator:
        • Right click on GracePeriod folder > Permissions
        • Click on Administrators group and click on Advanced button.
        • To the right of the Owners name click the 'Change' link and then change the ownership of the folder.
        • Also make sure the Administrators group has Full Control of the folder as well.
    • Then reboot the server.
    • After rebooting the server (and waiting for 3-5 minutes for it to reboot properly) try logging in.  If you can login right-click on the Start button and select Run. Then type tlsbln to run the Terminal services licensing balloon and see if it says the grace period will expire in 120 days).
    • NOTE: This is an article, which I have not verified is safe and correct, that may help to extend the grace period one of our customers need a few more days and are dead in the water without it... http://deadlytechnology.com/terminal-services/regenerating-temporary-terminal-server-cals/

    Fixing RDP Licensing Server glitch on Server 2012 R2

    These notes were emailed to Steve on 4/24/17:

    To fix the problem, run the following commands in powershell to set the licensing server properly on the rd session host using the WMI CIM provider:

    $obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
    $obj. SetSpecifiedLicenseServerList("licserver.domain.local") 

    Then, go into the registry and manually set the licensing mode:

    HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\LicensingMode
    You need to change the DWORD to 2 for Per Device or 4 for Per User.

    Reboot

    Remote Desktop Printing Problems

    Print Job Goes to Print Spooler and then is removed from the spooler successfully - but it never really prints to the remote printer (on Windows 2012 Server)

    This is what Adam Gleason said he did that he believes was the reason the problem was solved:

    • Click Start, search for cmd.exe
    • Right click on cmd.exe, click 'Run as Administrator'
    • Type C:\  and then press Enter.
    • Type CD\Windows\System32\Spool and then press Enter.
    • Type Cacls.exe PRINTERS /e /e users:C and then press Enter.
    • Restart the server.

    RDP Support Sites

    2008

    2012

    • ...

    Installing Remote Desktop Services and Licenses (Server 2012)

    Installing Active Directory - FIRST

    • You cannot install Remote Desktop in Application Sharing mode until you set up Active Directory FIRST.
    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • Click Add Roles and Features (on the Dashboard screen), then Next, the Role-Based

    Installing Active Directory (If you initially installed RDP on a MEMBER server with 120 Day Grace Period...And it Expired!)

    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • Click Add

    How to Install the Remote Desktop Services Roles & Features


    (If necessary, install the RD Licensing role service)

    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • On the left side of the window, click Remote Desktop Services, and then click Overview.
    • Under Deployment Overview, click the + icon above RD Licensing.
    • On the Select a server page, click on the Server, click the right arrow, and then click Next.
    • On the Confirm selections page, verify the RD Licensing role service will be installed, and then click Add.
    • On the View progress page, confirm the installation of the RD Licensing role service was successful, and then click Close.

    To Activate a Remote Deskop License Server Automatically (and install Remote Desktop Licenses)

    NOTE: Before starting this process make sure you have purchased Open License Remote Desktop User Licenses.  You should have an (Open License) Authorization Number (15 characters) and License Number (8 characters) ready to enter into the Activate Server Wizard.

    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • On the left side of the window, click Remote Desktop Services.
    • Click Servers.
    • Right-click Server name, and then click RD Licensing Manager.
    • Right-click Server name, and then click Activate Server. The Activate Server Wizard starts.
    • In the Activate Server Wizard, on the Welcome to the Activate Server Wizard page, click Next.
    • On the Connection Method page, in the Connection method: drop-down list, select Automatic connection (recommended), and then click Next.
    • On the Company Information page, enter your First Name:, Last Name:, and Company:, select your Country or Region: from the drop-down list, and then click Next.
    • On the Company Information optional information page, specify any other information that you want to provide, such as Email:, and Company address:, and then click Next.
    • On the Completing the Activate Server Wizard page, ensure that the Start Install Licenses Wizard now check box is checked, and then click Next.  This will open the Activate Server Wizard. Then click Next again.
    • On the License Program page change the License Program to Open License, then click Next.
    • Enter the Authorization Number and License Number, then click Next.
    • In the Product Version field select Windows Server 2012
    • In the License Type field select RDS Per User CAL (assuming you purchased PER USER CALs)
    • In the Quantity field enter the # of licenses you purchased, then click Next.
    • Click Finish.

    To Install Remote Desktop Open Licenses

    • Open the Server Manager using the blue and grey icon next to Start button, (or Click Start, type servermanager.exe, and then click Server Manager)
    • If you do not see the Server Manager > Dashboard (in the top left section of screen click on the Server Manager text in top left corner)
    • Click on the Remote Desktop Services (assuming you have already following the steps above to install and activate Remote Desktop Services) 
    • Right-Click on the Server Name (in the center of the screen) and select RD Licensing Manager
    • Then click "+" next to All Servers then click on the name of your server.
    • When the list of license versions and types appear right-click on the Windows Server 2012 - Installed RDS Per User CAL row and then select Install Licenses.  This will open up the Install Licenses Wizard
      • Click Next
      • Make sure the License program = Open License, then click Next
      • Enter the Agreement Number (Authorization Number) and the License Number you received in the email from Microsoft 
      • On the Product Version and License Type screen, enter:
        • Product Version: Windows Server 2012
        • License Type: RDS Per User CAL
        • Quantity: Enter the Qty of licenses purchased.
        • Then click Next
        • If installed correctly the message will appear stating: Status: The requested licenses have been successfully installed.
        • Then click Finish.
    • Now double check the status by doing this:
      • Go Back to the Server Manager > Remote Desktop Service > Server (following the same steps above), then right-click on the server name and select RD Licensing Diagnoser and make sure there are no RED or YELLOW warnings pertaining to licensing.
    • If there are issues (while still in the RD Licensing Manager) try this:
      • Right-Click on Server name, select Manage Licenses
      • Click Next
      • Click Rebuild the license server database and select a reason (such as The RD Licensing database has become corrupted), then click Next.
      • Select checkbox 'Confirm deletion of licenses currently installed on this license server, then click Next, then Next again...
      • Then repeat the similar steps you made above by entering the License Program = Open License, etc...
      • Then, when the 'what do you want to do next option appears, select 'Finish rebuilding the RD Licensing database', then click Next.
    • If you still have issue you may to contact Microsoft for support installing the open license.
      • Licensing Clearinghouse to 'Activate' products: 888-571-2048

    Installing Remote Desktop Licenses (Server 2008)

    • First obtain the actual license number(s) needed (to enter at the appropriate time after following the steps below:
      • If the licenses purchased are 'open' licenses, then you will need to have 2 numbers:
        • Licensing ID (an 8 digit code)
        • Parent Program (15 digit code)
        • You may have to log into the Volume License Service Center to get the codes:
          • Login here: https://www.microsoft.com/Licensing/servicecenter/default.aspx
          • Click on Licenses menu option (which is one of the options in the menu bar across the top of the page)

          • Then click on Filter Licensing IDs included in this Summary link (in a list of links on the right side of the page)
          • Write down the following 2 codes:
            • Licensing ID: (an 8 digit code)
            • Parent Program (15 digit code) (
      • If the licenses are purchased as 'Retail' licenses then the code will look like this:
        • xxxx xxxxx xxxxx xxxxx xxxxx (25 digits long)
    • To install the Remote Desktop Licensing Manager:
      • Open the Server Manager (Note: Start > Administrative Tools > Server Manager, OR, in search box type: ServerManagerCmd.exe)
      • If necessary, under the Roles (on the left hand side in the Server Manager tree) add the Remote Desktop Services Role(s)
        • On right side, under the Roles Summary, click Add Roles (green plus sign)
      • Scroll down to Advanced Tools
      • Click on Remote Desktop Licensing Manager
        • You may need to configure a license server for the Remote Desktop Session Host server. For instructions see How to 
      • In the Right pane Right Click on the server and select Install Licenses
      • Follow the wizard Prompts
    • To Activate RDP licenses (Win2008)
      • Start > Administrative Tools > Remote Desktop Services > Remote Desktop Licensing Manager
      • Click "+" sign on left then click on the SERVER name.
      • In right pane, right-click on the license and select 'Install Licenses'.
        • NOTE: If you see a red x you may need to 'Activate the Server' using the 'Activate Server Wizard'
          • Right click on the server name (in the right hand pane) and select Activate Server)
          • Follow the wizard steps.
          • When it is finished you may be given the option to click Next again (with the Start Install Licensing Wizard).
      • Click Next
      • License Program: (Select the program you used to purchased the licenses):
        • Open Licenses: Select 'Open License' then click Next
          • Enter Agreement Number and License Number (see Google Doc where we store that info: open Google drive and search for: Log of Open License Agreements), then click Next
          • Product Version: Select the version # of the Server you are on.
          • License Type: TS or RDS Per User CAL
          • Quantity: Enter the Qty purchased. 
          • Click Next, then click Finish.
        • Retail
          • Enter 25 digit alpha numeric code (in the 5 boxes)
    • If you NEED to talk to a person when installing the licenses, make sure the connection method is set to Telephone.
      • Start > Administrative Tools > Terminal Services > TS Licensing Manager.
      • On Console Tree (on the left) right-click on the Terminal Services license server on which you want to install the TS Cals > then click Properties.
      • Make sure the Connect Method is set to Telephone.  Click on the Connect Method drop down box if necessary and select Telephone from the list. (Follow prompts to determine the Country).
      • Then click OK.  
      • On Console Tree (on the left) right-click on the Terminal Services license server on which you want to install the TS Cals > then click Install Licenses.
      • Then click Next.
      • Call the phone # on the screen

    Installing Remote Desktop Services and Licenses (Server 2019)

    Installing Active Directory - FIRST

    PART 1

    • You cannot install Remote Desktop in Application Sharing mode until you set up Active Directory FIRST.
    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • Click Add Roles and Features (on the Dashboard screen), then Next, the Role-Based or Feature-based installation. Click Next
    • Select a Server. Click Next.
    • Server Roles. Check Active Directory Domain Services. Then add the features on the popup. Click Next.
    • Features. Click Next. AD DS. Click Next.
    • Confirmation. Check the Restart the destination server automatically if required. Click Install and the server will reboot.
                PART 2
    • Install Active Directory Domain Services
    • After installing clock on the notification with a yellow flag. Click on the Promote this server to a domain controller.
    • A Window will show up for the Deployment Configuration
    • For the first time installation, clock on the Add a new forest.
    • Input in the domain name: OneSource111.local
    • Domain Controller Options: type in the password for the Directory Services Restore Mode (DSRM) password-- ask Rachelle for the password. Click on Next.
    • DNS Options: Click Next.
    • Additional Option: This will check if the NetBIOS domain name is still available and will let you change it if necessary.: ONESOURCE111. Click Next
    • Paths: Default locations. Click Next.
    • Review Options: Review the settings. Click Next.
    • Prerequisites Check: Will check it to completely check. 
    • Click Install. This will require you to reboot the server after the installation.

    Installing Active Directory (If you initially installed RDP on a MEMBER server with 120 Day Grace Period...And it Expired!)

    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • Click Add

    How to Install the Remote Desktop Services Roles & Features

    • In order for more than just 2 users to be able to access the server at a time you need to setup the RD Licensing Role.  Follow the steps below:
      • Open the Server Manager
      • Click on the All Servers on the right hand side under Dashboard and Select the Manage drop down list on the upper right hand corner and select Add Roles and Features
      • Click Next on the Add Roles and Features wizard
      • The installation type should be the Role-based or feature-based installation.  Then click Next
      • Select a server from the server pool and then click Next.
      • Scroll down to the Remote Desktop Services and select it and click Next
      • Click Next without selecting a Feature
      • Click Next
      • Select the Remote Desktop Connection Broker, Remote Desktop Gateway, Remote Desktop Licensing and Remote Desktop Session Host.
      • Click Add Features on the popup and click Next
      • Select the Restart the destination server automatically if required and then click Install.
      • When the server is done installing follow the above steps again until you get to the Remote Desktop Services and you will then see an Arrow to the left of it.  You will want to click the arrow to drop down additional options
      • Then check the Remote Desktop Connection Broker, Remote Desktop Gateway, Remote Desktop Licensing and Remote Desktop Session Host.
      • Then click Next

    (If necessary, install the RD Licensing role service)

    • Log on to the server with Admin rights.
    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • On the left side of the window, click Remote Desktop Services, and then click Overview.
    • Under Deployment Overview, click the + icon above RD Licensing.
    • On the Select a server page, click on the Server, click the right arrow, and then click Next.
    • On the Confirm selections page, verify the RD Licensing role service will be installed, and then click Add.
    • On the View progress page, confirm the installation of the RD Licensing role service was successful, and then click Close.

    How To Get the The Authorization Number and License number

    • Go to the Microsoft Volume Licensing Service Center
    • Click on the Licenses
    • Choose Relationship Summary. This will show the summary of Licenses IDs available.
    • Click on the License number you need to use. E.g. OneSource Software Solutions License 65736885
    • The Open License Details is the License Number
    • The Parent Program is the Authorization Number
    • Placed these info on the License Program on the Install Licenses Wizard on the following the steps below.

    To Activate a Remote Desktop License Server Automatically (and install Remote Desktop Licenses)/Installing RDS CALs

    NOTE: Before starting this process make sure you have purchased Open License Remote Desktop User Licenses.  You should have an (Open License) Authorization Number (15 characters) and License Number (8 characters) ready to enter into the Activate Server Wizard.

    • Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    • On the left side of the window, click Remote Desktop Services.
    • Click Servers.
    • Right-click Server name, and then click RD Licensing Manager.
    • Right-click Server name, and then click Activate Server. The Activate Server Wizard starts.
    • In the Activate Server Wizard, on the Welcome to the Activate Server Wizard page, click Next.
    • On the Connection Method page, in the Connection method: drop-down list, select Automatic connection (recommended), and then click Next.
    • On the Company Information page, enter your First Name:, Last Name:, and Company:, select your Country or Region: from the drop-down list, and then click Next.
    • On the Company Information optional information page, specify any other information that you want to provide, such as Email:, and Company address:, and then click Next.
    • On the Completing the Activate Server Wizard page, ensure that the Start Install Licenses Wizard now check box is checked, and then click Next.  This will open the Activate Server Wizard. Then click Next again.
    • On the License Program page change the License Program to Open License, then click Next.
    • Enter the Authorization Number and License Number, then click Next.
    • In the Product Version field select Windows Server 2012
    • In the License Type field select RDS Per User CAL (assuming you purchased PER USER CALs)
    • In the Quantity field enter the # of licenses you purchased, then click Next.
    • Click Finish.

    To Install Remote Desktop Open Licenses

    • Open the Server Manager using the blue and grey icon next to Start button, (or Click Start, type servermanager.exe, and then click Server Manager)
    • If you do not see the Server Manager > Dashboard (in the top left section of screen click on the Server Manager text in top left corner)
    • Click on the Remote Desktop Services (assuming you have already following the steps above to install and activate Remote Desktop Services) 
    • Right-Click on the Server Name (in the center of the screen) and select RD Licensing Manager
    • Then click "+" next to All Servers then click on the name of your server.
    • When the list of license versions and types appear right-click on the Windows Server 2019 - Installed RDS Per User CAL row and then select Install Licenses.  This will open up the Install Licenses Wizard
      • Click Next
      • Make sure the License program = Open License, then click Next
      • Enter the Agreement Number (Authorization Number) and the License Number you received in the email from Microsoft 
      • On the Product Version and License Type screen, enter:
        • Product Version: Windows Server 2012
        • License Type: RDS Per User CAL
        • Quantity: Enter the Qty of licenses purchased.
        • Then click Next
        • If installed correctly the message will appear stating: Status: The requested licenses have been successfully installed.
        • Then click Finish.
    • Now double check the status by doing this:
      • Go Back to the Server Manager > Remote Desktop Service > Server (following the same steps above), then right-click on the server name and select RD Licensing Diagnoser and make sure there are no RED or YELLOW warnings pertaining to licensing.
    • If there are issues (while still in the RD Licensing Manager) try this:
      • Right-Click on Server name, select Manage Licenses
      • Click Next
      • Click Rebuild the license server database and select a reason (such as The RD Licensing database has become corrupted), then click Next.
      • Select checkbox 'Confirm deletion of licenses currently installed on this license server, then click Next, then Next again...
      • Then repeat the similar steps you made above by entering the License Program = Open License, etc...
      • Then, when the 'what do you want to do next option appears, select 'Finish rebuilding the RD Licensing database', then click Next.
    • If you still have issue you may to contact Microsoft for support installing the open license.
      • Licensing Clearinghouse to 'Activate' products: 888-571-204

    Review RDS CAL License Install

    1. On the RDS Licensing Manager, right click "server name" then click "Review Configuration"  
    2. If there are 2 yellow warnings: 
      • Click the "Add to Group" next to " The License server or the network service account is not a member of the Terminal Server License Servers group In Active Directory Doman Services. The License server will not be able to issue RDS Per User CALs to Users in the domain, and you will not be able to track or report the usage of RDS per User CALs on this License Server.
      • Click "Register as SCP" next to This license server is not registered as a service connection point (SCP) in Active Directory Domain Services. The license server will not appear in the list of known license servers in the Remote Desktop Secession Host Server Configuration tool.


    3. Then you can see the message as 'You must restart the Remote Desktop Licensing service. Until the service is restarted this License server will not be able to issues RDS Per user CALs to users in the domain, and you will not be able to track or report the usage of RDS User CALs on this licensed server.' To fix this warning:

    • Go to Windows Services section and restart the windows service named "Remote Desktop Licensing service" and Click Ok.
    • Then, right click the 'Server Name' in the "RD Licensing Manager" then click "Review Configuration." Then you will see that the RDS CAL License Installation is successful.

    Configuring RDS Group Policy

    • Edit the Group Policy
      • Go to Start Menu > Search Edit Group Policy(CMD prompt: gpedit.msc) > Local Group Policy Editor
      • On the navigation on the left panel go to: Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Services > Remote Desktop Session Host > Licensing
      • Edit the policy titled: Set the Remote Desktop licensing mode by double clicking it.
      • Click on the Enabled button.
      • Specify the licensing mode for the RD Session Host server: Per User. Click Ok and Save the changes.
      • Then on the Licensing, double click the Use the specified Remote Desktop license servers to edit it.
      • Click on the Enabled button.
      • On the License servers to user, input in the Computer name or server's IP4 address (you can find this by entering ipconfig on the CMD). Then click OK.
    • Navigate to: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections
    • Edit the policy "Limit number of connections".
    • Select "Enabled" and change the number to "999999". This will allow unlimited remote connections. Click Apply.
    • To apply changes, the group policy must be updated. To initiate this, open Command Prompt (as admin) and enter the following command:  gpupdate.exe/force Note: This step is required for any changes to take effect. 

    *After following the above steps, users will be able to remote into the specified server.

    How to Reduce a Portion of the Licenses using WMI/ Remove An Individual RDS CAL License Pack Using Powershell (User or Device CAL)

    For Windows Server 2019:

    1. You need to obtain the KeyPack ID of the license keypack that you want to remove licenses from. Open the PowerShell prompt and run the following:   
    Get-WmiObject Win32_TSLicenseKeyPack|Select KeyPackId, ProductVersion, TotalLicenses, TypeAndModel|Format-List
    1. In the results please find the correct KeyPack ID.  
    2. Then, run the following in the same PowerShell prompt to remove some of the licenses: 
    Invoke-WmiMethod -Class Win32_TSLicenseKeyPack -Name RemoveLicensesWithIdCount -ArgumentList <KeyPackId>,<NumberOfCALsToRemove>
      • For example, if the KeyPackId is 4 and you want to reduce the license count by 10 you would enter: Invoke-WmiMethod -Class Win32_TSLicenseKeyPack -Name RemoveLicensesWithIdCount -ArgumentList 4, 10
      • If the command is successful the return code should be 0. After running the command please verify that the count has been reduced by running the GetWmiObject command.

    For Older version of Windows Server like Windows Server 2008:

    1. Open powershell elevated as an administrator
    2. Type the following command to list the RDS Licenses and note the KeyPackID 

    • Alternatively, open RD Licensing manager and note Keypack ID

    Get-WmiObject Win32_TSLicenseKeyPack

    3. Run the below command to remove the licenses pack from your RD Server.

    • Replace the KEYPACKID with the number you obtained above

    wmic /namespace:\\root\CIMV2 PATH Win32_TSLicenseKeyPack CALL UninstallLicenseKeyPackWithId KEYPACKID

    Rebuild the RD Licensing Database: https://technet.microsoft.com/en-us/library/dd851428.aspx

    Error: Remote Desktop License Issue 2019

    BIG PICTURE: The error message: There is a problem with you Remote Desktop license, and your session will be disconnected in 60 minutes. Contact your system administrator to fix this problem. In the Windows Server 2019 environment. User CALs require Active Directory which needs to be setup on the Server Manager.

    The error happens when the server do not have an Active Directory which can be installed using the Add Roles and Features on the Server Manager.

    To Install:

    • Go to the Server Manager>Manage> Add Roles and Features... 
    • Install Active Directory Domain Services
    • After installing clock on the notification with a yellow flag. Click on the Promote this server to a domain controller.
    • A Window will show up for the Deployment Configuration
    • For the first time installation, clock on the Add a new forest.
    • Input in the domain name: OneSource111.local
    • Domain Controller Options: type in the password for the Directory Services Restore Mode (DSRM) password-- ask Rachelle for the password. Click on Next.
    • DNS Options: Click Next.
    • Additional Option: This will check if the NetBIOS domain name is still available and will let you change it if necessary.: ONESOURCE111. Click Next
    • Paths: Default locations. Click Next.
    • Review Options: Review the settings. Click Next.
    • Prerequisites Check: Will check it to completely check. 
    • Click Install. This will require you to reboot the server after the installation.

    How to fix: To sign in remotely, you need a right to sign in through Remote Desktop Services (Click Here)

    BIG PICTURE: User is in the RDS Users but gets an error message: To sign in remotely, you need the right to sign in through RDS. By default, members of the Administrators group have this right. If the group you're in doesn't have this right, or the right has been removed from the Administrator group, you need to be granted this right manually.

    Step 1. ADD REMOTE DESKTOP USER TO THE REMOTE DESKTOP USERS GROUP.

    1. Open Server Manager
    2. From Tools Menu, select Active Directory Users and Computers. *Note: If the RD Session Host Server is not installed on the Domain Controller, use the 'Local User and Groups' snap-in or the 'Remote' tab in the 'System Properties'. to add the remote desktop users.
    3. Double click at your domain on the left and then select Builtin.
    4. Open Remote Desktop Users on the right pane.
    5. At Members tab, click Add.
    6. Type the AD users that you want to give Remote access to the RDS Server and click OK.
    7. After selecting the remote desktop users, click OK again to close the window.
    8. Continue to step-2 below.
                Step 2. ALLOW THE LOG ON THROUGH REMOTE DESKTOP SERVICES

    1. Open Group Policy Editor. To do that:  (a) Simultaneously press the Windows + R keys to open run command box. (b) Type gpedit.msc and press Enter.
    2. In Group Policy Editor navigate to: Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment.
    3. At the right Pane: double click at Allow log on through Remote Desktop Services.
    4. Click Add User or Group.
    5. Type remote and then click Check Names.
    6. Select the Remote Desktop Users and click OK.
    7. Click OK at 'Select users, computers...' window.
    8. Finally click OK again and close Group Policy Editor.
    9. Now try to connect from the remote desktop client. The remote sign-in problem should be solved now.


    How to specify a license server for RD Session Host server

    • Open the Server Manager.
    • Click Roles > Remote Desktop Services
    • Right-click and select Add Role Services
    • Select Remote Desktop Licensing and click Next
    • Click Configure a discovery scope for this license server, and then click Next.  Then click Finish.


    (Microsoft Instructions) To specify a license server for the RD Session Host server to use

    1. On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.

    2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

    3. In the Edit settings area, under Licensing, double-click Remote Desktop license servers.

    4. On the Licensing tab of the Properties dialog box, click Add.

    5. In the Add License Server dialog box, select a license server from the list of known license servers, and then click Add. If the license server that you want to add is not listed, in the License server name or IP address box, type the name or IP address of the license server that you want to add, and then click Add.

      You can add more than one license server for the RD Session Host server to use. The RD Session Host server contacts the license servers in the order in which they appear in the Specified license servers box.

    6. Click OK to close the Add License Server dialog box, and then click OK to save your changes to the licensing settings.

    You can also specify a license server for the RD Session Host server to use by applying the Use the specified Remote Desktop license servers Group Policy setting. This Group Policy setting is located in Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing and can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC). Note that the Group Policy setting takes precedence over the license servers configured in Remote Desktop Session Host Configuration.

    For more information about Group Policy settings for Remote Desktop Services, see the Remote Desktop Services Technical Reference (http://go.microsoft.com/fwlink/?LinkId=138134).

    You can also use the Remote Desktop Services module for Windows PowerShell to configure RD Licensing-related settings. For more information about using Windows PowerShell with Remote Desktop Services, see the Remote Desktop Services Technical Reference (http://go.microsoft.com/fwlink/?LinkId=139898).

    For more information about RD Licensing, see the Remote Desktop Services page on the Windows Server 2008 R2 TechCenter (http://go.microsoft.com/fwlink/?LinkId=140434).

    Terminal Server Licensing - Troubleshooting

    Why We Like Remote Desktop

    1. OneSource runs 2-10x faster, when the data can be accessed by OneSource on the local server (assuming that the OneSource client AND the data are both run from a local disk drive, like the C drive).
    2. The data is more secure as it never leaves the server.  (In client/server mode if the users PC looses connectivity to the server (for any reason) while a record is being added or edited it usually causes corruption to the database). 
    3. It lowers the cost of administration, which ultimately lowers the cost of our product/services. (Installing updates, training users, RDPing over to any users session to give tech support, etc.  It makes the world smaller).
    4. It is more accessible to Andrews users from home or any remote location without having to buy/install something like GoToMyPC. 
    5. It lowers risk of viruses.  Most network admins would claim that allowing users to log onto the server directly would increase the chances of the server getting a virus.  We agree with that assessment--IF--the user are allowed to use their server session like a PC.  However, since moving to this configuration our customer's server viruses have actually been eliminated.  When we used to run our application in client/server mode, with a mapping to the server, when users got a virus, in many, many cases that virus looked for all mappings (including those mapped to the server to access the OneSource data) and gave the server a virus as well.  Now when a user gets a virus on their PC the server does NOT get the virus.  We have that the KEY to keeping the server safe (but still highly accessible) is if the network admin enforces at least these 3 things:
      • Make sure users do not have admin rights, 
      • Do not install or allow any use of any type of email clients on the server, and 
      • Remove all non-admin user rights to use a browser. (Which forces them to do the type of activities that are virus prone OFF the server).  
    6. Final Note: We DO understand that allowing RDP access opens a port that is routinely scanned by hackers.  For this reason, we recommend that you change the port for RDP (on the outward facing port on the router) to some random 5 digit port, such as 22767, and then point all traffic coming through that port to port 3389 on the inward facing port.  

    Other 'Remote Desktop Options'