Monday, March 23, 2015

Brute Force Approach To TSAdmin on Server 2012 R2

It's a common problem.  Your server has Remote Desktop enabled, and multiple administrators hop on to a server, don't properly log off, and you want to see who is connected and remotely disconnect them.

In Server 2003, we had tsadmin.exe.  In Server 2008, we had tsadmin.msc.  But in Server 2012 R2, we have... what?

I found what I will deem a brute force approach to fixing this problem.  Basically copying some files from a 2008 server along with some registry settings, and getting yourself something working on Server 2012.

From a 2008 server, copy:

  • tsadmin.dll
  • tsadmin.msc
  • umcres.dll (this file was already on my Server 2012 system, so I did NOT overwrite)
  • wts.dll
Then make the below registry modifications.  (I copied this text into notepad, saved with a .reg extension.  Double click from your server to execute.)

Reboot and voila.  tsadmin.msc will work for you.

I'm not going to highlight this as a best practice, but it is working for me.  Use at your own risk.  



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\FX:{3FCE72B6-A31B-43ac-ADDA-120E1E56EB0F}]

"ApplicationBase"=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,\

  73,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,00,00

"About"="{00000000-0000-0000-0000-000000000000}"

"VersionStringIndirect"="@C:\\Windows\\System32\\umcRes.dll,-106"

"ProviderStringIndirect"=hex(2):40,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,\

  00,6f,00,77,00,73,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\

  5c,00,75,00,6d,00,63,00,52,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,\

  00,31,00,30,00,32,00,00,00

"NameString"="Remote Desktop Services Manager"

"HelpTopic"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\

  74,00,25,00,5c,00,68,00,65,00,6c,00,70,00,5c,00,74,00,73,00,5f,00,6d,00,61,\

  00,6e,00,61,00,67,00,65,00,72,00,2e,00,63,00,68,00,6d,00,00,00

"AssemblyName"="tsadmin"

"RuntimeVersion"="v2.0.50215"

"Description"="Manage Remote Desktop Services sessions"

"DescriptionStringIndirect"=hex(2):40,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,\

  64,00,6f,00,77,00,73,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\

  00,5c,00,75,00,6d,00,63,00,52,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,\

  2d,00,31,00,30,00,34,00,00,00

"LinkedHelpTopics"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\

  00,6f,00,74,00,25,00,5c,00,68,00,65,00,6c,00,70,00,5c,00,74,00,73,00,5f,00,\

  6d,00,61,00,6e,00,61,00,67,00,65,00,72,00,2e,00,63,00,68,00,6d,00,00,00

"NameStringIndirect"=hex(2):40,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,\

  00,77,00,73,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\

  75,00,6d,00,63,00,52,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,\

  00,30,00,33,00,00,00

"IconIndirect"=hex(2):40,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,\

  00,73,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,\

  6d,00,63,00,52,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,31,\

  00,31,00,00,00

"FxVersion"="2.0.1.7"

"Type"="Microsoft.TerminalServices.Monitor.SnapIn.TSManagerSnapIn, tsadmin, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

"FolderBitmapsColorMask"=dword:00000000

"ModuleName"="tsadmin.dll"

"Provider"="Microsoft Corporation"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\FX:{3FCE72B6-A31B-43ac-ADDA-120E1E56EB0F}\NodeTypes]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\FX:{3FCE72B6-A31B-43ac-ADDA-120E1E56EB0F}\Standalone]