======Microsoft - Terminal Server / Remote Desktop======
=====Documentation=====
[[https://www.microsoft.com/en-us/download/details.aspx?id=29022|Microsoft Download Center - Understand and Troubleshoot Remote Desktop Services Desktop Virtualization in Windows Server "8" Beta]] \\
====MS KB Articles====
[[http://support.microsoft.com/kb/2312539/en-us|Available updates for Terminal Services (Remote Desktop Services) in Windows Server 2008 (KB2312539)]] \\
[[https://support.microsoft.com/en-us/kb/2601888|Available Updates for Remote Desktop Services (Terminal Services) on Windows Server 2008 R2 SP1 (KB2601888)]] \\
[[https://support.microsoft.com/en-us/kb/2821526|Available updates for Remote Desktop Services in Windows Server 2012 (KB2821526)]] \\
[[https://support.microsoft.com/en-us/kb/2933664|Available Updates for Remote Desktop Services in Windows Server 2012 R2 (KB2933664)]] \\
[[https://support.microsoft.com/en-us/kb/4039839/|Available Remote Desktop Services updates in Windows Server 2016 (KB4039839)]] \\
[[http://support.microsoft.com/kb/289289|Remote desktop connection "The local policy of this system does not permit you to logon interactively"]] \\
[[http://support.microsoft.com/kb/238965|Removing Additional Permissions Granted to Terminal Services Users]] \\
[[http://support.microsoft.com/kb/297379|Programs can revert to the default settings on Terminal Server]] \\
[[http://support.microsoft.com/kb/324446/en-us|Terminal Server and connected Terminal Services clients pause when a Terminal Services client logs on or logs off]] \\
[[http://support.microsoft.com/kb/327508/en-us|How to turn on the Terminal Services Session Directory logging service]] \\
[[http://support.microsoft.com/kb/278295/en-us|How to lock down a Windows Server 2003 or Windows 2000 Terminal Server session]] \\
[[http://support.microsoft.com/kb/2258090/en-us|Copying files larger than 2 GB over a Remote Desktop Services or Terminal Services session by using Clipboard Redirection (copy and paste) fails silently]] \\
[[http://support.microsoft.com/kb/885187/en-us|Remote Desktop Protocol settings in Windows Server 2003 and in Windows XP]] lists the settings in an .rdp file. \\
===Server 2012===
[[https://support.microsoft.com/en-us/kb/2833839|Guidelines for installing the Remote Desktop Session Host role service on a computer running Windows Server 2012 without the Remote Desktop Connection Broker role service (KB2833839)]] \\
=====Firewall=====
====RD Licensing=====
"Terminal Server Licensing uses Remote Procedure Call (RPC) over port 135, and a dynamically assigned port above 1024." \\
Source: [[https://social.technet.microsoft.com/Forums/windowsserver/en-US/7a57249a-97bd-4382-9161-d7a8700c2691/does-anyone-know-the-appropriate-firewall-rules-to-allow-rd-license-server-access?forum=winserverTS|Microsoft Windows Server Forum - Does anyone know the appropriate firewall rules to allow RD License Server access?]] \\
=====Articles/Blogposts=====
[[http://www.brianmadden.com/content/article/How-Applications-use-the-Registry-in-Terminal-Server-Environments-Part-2-of-3|How Applications use the Registry in Terminal Server Environments (Part 2 of 3)]] \\
[[http://www.brianmadden.com/content/article/Finally-Shadow-Key-Timestamping-Utilities-from-Microsoft|Finally! Shadow Key Timestamping Utilities from Microsoft]] \\
[[http://virtrix.blogspot.com/2006/12/citrix-shadow-key-timestamps.html|Citrix: Shadow Key timestamps]] \\
[[http://blogs.sepago.de/helge/2008/05/25/x64-my-terminal-servers-run-just-fine-with-32-bits-and-81216-gb-ram/|x64? My Terminal Servers Run Just Fine With 32 Bits and 8/12/16 GB RAM!]] \\
[[http://insights.oetiker.ch/windows/w2k3_tuning/|O+P Insights - Tuning Windows 2003 Terminal Server]] (take with a grain of salt)\\
[[http://blog.tatham.oddie.com.au/2007/07/28/strange-server-behavior-huge-io-other-count-for-csrssexe/|Tatham Oddie - Strange server behavior – huge I/O other count for csrss.exe (SOLVED!)]] zie ook:[[http://www.eggheadcafe.com/conversation.aspx?messageid=33307969&threadid=33307969|eggheadcafe - csrss.exe High I/O in combination with Terminal service]] \\
[[http://www.citrixtools.net/en/Articles/articleType/ArticleView/articleID/36/Terminal-Server-XenApp-Tuning-Tips.aspx|CitrixTools.Net - Terminal Server & XenApp Tuning Tips]] \\
[[http://ts.veranoest.net/|Vera Noest - Remote Desktop Services troubleshooting]] \\
**[[http://www.brianmadden.com/|brianmadden]]:** \\
[[http://www.brianmadden.com/blogs/terminal_services_for_microsoft_windows_server_2003_advanced_technical_design_guide/pages/getting-more-users-on-your-server.aspx|Getting More Users on your Server]] \\
[[http://anandthearchitect.com/2008/08/01/how-to-logoff-remote-desktop-sessions-via-command-line-tools/|* Awesome * Anand * - How to logoff remote desktop sessions via command line tools?]] \\
[[http://superuser.com/questions/207534/keyboard-shortcut-to-minimize-remote-desktop|Super User - Keyboard shortcut to minimize Remote Desktop]] describes several keyboard shortcuts for the Remote Desktop Client. \\
[[https://www.donkz.nl/overview-rdp-file-settings/|DONKZ.NL - Overview of .rdp file settings]] \\
[[https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff393699(v=ws.10)|Microsoft Docs - RDP Settings for Remote Desktop Services in Windows Server 2008 R2]] \\
[[https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files|Microsoft Docs - Supported Remote Desktop RDP file settings]] \\
====Windows Server 2012 / R2====
[[http://blogs.technet.com/b/tommypatterson/archive/2013/11/20/why-server-2012-r2-remote-desktop-sessions-and-virtual-desktop-infrastructure.aspx|TechNet Blogs » Tommy Patterson » Why Server 2012 R2? – Remote Desktop Sessions and Virtual Desktop Infrastructure]] \\
[[https://social.technet.microsoft.com/Forums/windowsserver/en-US/1e283abc-a0d5-480c-8fca-814bf912bddf/where-are-tsadminmsc-and-tsconfigmsc?forum=winserver8gen|Windows Server Forums - Where are tsadmin.msc and tsconfig.msc?]] provides a hack to be able to use the Server 2008 (R2) tsadmin.msc and tsconfig.msc. \\
[[http://serverfault.com/questions/469980/using-tsconfig-tsadmin-in-windows-server-2012-locally|Server Fault - Using tsconfig/tsadmin in Windows Server 2012 locally]] \\
[[http://serverfault.com/questions/471391/enable-sound-for-rdp-in-windows-server-2012|Server Fault - Enable Sound for RDP in Windows Server 2012]] \\
=====Blogs=====
[[http://blogs.msdn.com/rds/|Remote Desktop Services (Terminal Services) Team Blog]] \\
=====Clients=====
[[http://www.rdesktop.org/|rdesktop]] A Remote Desktop Protocol Client for accessing Windows NT Terminal Server.\\
[[http://www.jacco2.dds.nl/rdesktop/|Jacco's rdesktop page]] for the OS/2 port and links to other rdesktop. \\
[[http://properjavardp.sourceforge.net/|properJavaRDP]] Java based RDP client based on rdesktop. \\
[[http://www.elusiva.com/opensource/|Elusiva - Open Source JavaRDP]] Java based RDP client based on rdesktop and properJavaRDP. \\
[[http://code.google.com/p/lixia-javardp/|Lixia-JavaRDP]] GNU GPL v3 licensed Java RDP client for Windows Terminal Services based on properJavaRDP. \\
[[http://www.freerdp.com/|FreeRDP]] is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. \\
=====Licensing======
**Server 2008** \\
[[http://www.microsoft.com/windowsserver2008/en/us/licensing-terminal.aspx|Microsoft - Licensing Remote Desktop Services in Windows Server 2008 R2]] \\
**Server 2003** \\
[[http://www.brianmadden.com/blogs/brianmadden/archive/2004/04/01/the-ultimate-guide-to-windows-2003-terminal-server-licensing.aspx|Brian Madden - The Ultimate Guide to Windows 2003 Terminal Server Licensing]] see [[http://www.opssys.com/InstantKB/attachments/Q10250/Terminal_Server_2003_Licensing.pdf|deze link]] for the PDF version. \\
[[http://www.microsoft.com/windowsserver2003/techinfo/overview/termservlic.mspx|Microsoft - Windows Server 2003 Terminal Server Licensing]] contains a link to a Word document of the same name. \\
[[http://www.microsoft.com/windowsserver2003/howtobuy/licensing/ts2003.mspx|Microsoft - Licensing Terminal Server in Windows Server 2003 R2]] \\
[[https://www.microsoft.com/windowsserver2003/howtobuy/licensing/priclicfaq.mspx|Microsoft - Windows Server 2003 Pricing and Licensing: Frequently Asked Questions]] \\
[[http://support.microsoft.com/kb/822134/en-us|Microsoft Support - The function of Terminal Server CALs in Windows Server 2003 (KB822134)]] \\
[[http://support.microsoft.com/kb/187614/en-us|Microsoft Support - Removing Terminal Server licenses from an RDP client (KB187614)]] \\
=====Printer Redirection=====
[[http://support.microsoft.com/kb/239088/en-us|Microsoft Support - Windows 2000 or Windows Server 2003 Terminal Services server logs events 1111, 1105, and 1106 (KB239088)]] \\
[[http://support.microsoft.com/kb/302361/en-us|Microsoft Support - Printers that use ports that do not begin with COM, LPT, or USB are not redirected in a remote desktop or a terminal services session (KB302361)]] \\
[[http://technet.microsoft.com/en-us/library/cc775141.aspx|Microsoft TechNet - Event ID 1111 — Terminal Services Printer Redirection]] describes the steps for a custom printer mapping file on Windows Server 2008, see [[http://technet.microsoft.com/en-us/library/ee891383.aspx|deze link]] for the Windows Server 2008 R2 version. \\
[[http://blogs.technet.com/askperf/archive/2007/08/24/terminal-server-and-printer-redirection.aspx|Ask the Performance Team - Terminal Server and Printer Redirection]] \\
[[http://blogs.msdn.com/rds/archive/2009/09/28/using-remote-desktop-easy-print-in-windows-7-and-windows-server-2008-r2.aspx|Remote Desktop Services (Terminal Services) Team Blog - Using Remote Desktop Easy Print in Windows 7 and Windows Server 2008 R2]] \\
[[http://www.brianmadden.com/blogs/terminal_services_for_microsoft_windows_server_2003_advanced_technical_design_guide/pages/managing-printer-drivers.aspx|Brian Madden - Managing Printer Drivers]] voor Windows Server 2003. \\
======Miscellaneous======
=====Remotely turn on RDP=====
Open regedit create a connection to the registry of the remote machine. Change the following key value to 0: \\
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000
Now the system has RDP enabled. An RDP connection should now be possible if no further (network)restrictions like (Windows) firewall are in place.
=====No valid software license was available=====
A Windows Server 2003 Terminal Server is set to use the license server that grants per user licenses.
After logging in to a Juniper SA and setting up an RDP session the following message appeared:
Windows Terminal Server Proxy \\
No valid software license was available.
Forgot to specify "Per User" with the license server settings on the Terminal Server. \\
The first error on [[http://technet.microsoft.com/en-us/library/cc756826(WS.10).aspx|TechNet - Troubleshooting Remote Desktop Licensing Error Messages]] gave the clue.
=====Update the shadow key timestamp=====
Sometimes you need to update or add registry keys to the shadow key on a Terminal Server. \\
To let the new keys apply to new user logins, you have to manually update the timestamp key after adding/modifying the registry keys.
Do this:
- Modify/add the registry keys
- Calculate the number of seconds since 1 januari 1970 (see UTC calculator link)
- Modfiy the value of the LatestRegistryKey DWORD below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\IniFile Times with this new value
Sources:\\
[[http://blogs.technet.com/b/askperf/archive/2010/12/10/terminal-services-exploring-the-shadows.aspx|Ask the Performance Team - Terminal Services - Exploring the Shadows]] \\
[[http://www.mbari.org/staff/rich/utccalc.htm|UTC seconds calculator]] \\
=====Copying files from RDP results in corrupt files=====
[[http://social.technet.microsoft.com/Forums/en/winservergen/thread/3b9634a7-4517-4fa9-9cd9-1e6c84945b18|Windows Server TechCenter > Windows Server Forums > General > Issue with copying files using RDPClip.exe rather than RDP Mapped Drives]] \\
[[http://forums.citrix.com/message.jspa?messageID=1479339|Citrix Knowledge Center> Support Forums > XenApp (Presentation Server) > XenApp 5.0 for Windows Server 2003 / Presentation Server 4.5 > Presentation Server 4.5 - General > File Transfer issue with RDPClip.exe rather than RDP Mapped Drives]] \\
=====Query the Session Broker / Connection Broker via WMI=====
Clusters:
Get-WmiObject Win32_SessionDirectoryCluster | Select-Object ClusterName,NumberOfServers | Format-Table -AutoSize
Servers:
Get-WmiObject Win32_SessionDirectoryServer | Select-Object ServerName,ClusterName,NumberOfSessions,ServerWeight | Format-Table -AutoSize
Via: [[https://social.technet.microsoft.com/Forums/windowsserver/en-US/31fb1510-f952-4c94-b343-addcb992d427/how-to-read-the-rd-connect-broker-database?forum=winserverTS|Microsoft - Windows Server Forum - How to read the RD Connect Broker DataBase!!!!]] \\
See also: \\
[[https://msdn.microsoft.com/en-us/library/windows/desktop/aa383636%28v=vs.85%29.aspx|Microsoft - Windows Dev Center - Win32_SessionDirectoryServer class]] \\
[[https://msdn.microsoft.com/en-us/library/windows/desktop/aa383635%28v=vs.85%29.aspx|Microsoft - Windows Dev Center - Win32_SessionDirectoryCluster class]] \\
=====Server 2012 R2 RemoteApp connects to RDWeb/Gateway instead of session host=====
Problem: When starting a RemoteApp from the RDWeb page that connects via an RD Gateway to 1 of 2 session hosts the RemoteApp tries to connect to the host address of the RDWeb/Gateway server instead of one of the session hosts / the farm address.
If you download the rdp file that gets downloaded from the RDWeb page (don't use IE, use Firefox), open it in Notepad, and change the RDWeb/Gateway address in the line "full address:s://Name OF RDWeb/Gateway server//" to the FQDN farm address the RemoteApp works.
Workaround (fix?): Add the full address of the RD Farm to the CustomRdpProperty on the Session Collection with powershell:
Set-RDSessionCollectionConfiguration -CollectionName "Name of RD Session Collection" -CustomRdpProperty "use
redirection server name:i:1 `n full address:s:rdfarm.domain.com"
// Replace "Name of RD Session Collection" with the name of your RD session collection. \\
Replace rdfarm.domain.com with the FQDN of your (internal) RD Farm. //
Source for the PowerShell option: [[http://serverfault.com/questions/524092/rds-rdweb-and-remoteapp-how-to-use-public-certificate-for-launching-apps-on-s|Server Fault - RDS, RDWeb, and RemoteApp: How to use public certificate for launching apps on session host?]] \\