TechNote: Restart RDP (Remote Desktop Protocol)

TechNote: Restart RDP
Technology
Operating System(s):
Windows Server 2008+
Windows 7+
Technology(ies):
Microsoft RDP
Use Case(s):
System Administration
Summary
Periodically RDP access to a remote host can become inoperable. One solution is to restart the offending system; and in the case of virtual machines (VMs) you may be able to access the system using the VM Manager. This solution may provide an option that if fast and friendly.
Description
Remote Command Line:
  1. sc \\{ServerName} queryex UmRdpService
  2. taskkill /s \\{ServerName} /pid {PID} 
    (it may necessary to force with /f option)
  3. sc \\{ServerName} queryex TermService
  4. taskkill /s \\{ServerName} /pid {PID}
    (it may necessary to force with /f option)
  5. sc \\{ServerName} start TermService
Local Command Line:
  1. sc queryex UmRdpService
  2. taskkill /pid {PID}
    (it may necessary to force with /f option)
  3. sc queryex TermService
  4. taskkill /pid {PID}
    (it may necessary to force with /f option)
  5. sc \\{ServerName} start TermService
Notes / Considerations
WARNING: DO NOT try this on a production system without first testing it to ensure the results are what you expect.

Comments

Popular posts from this blog

TechNote: Install LogMeIn Hamachi on Linux

Hope, Tradition, and Realism in the Papacy of Pope Leo XIV: A Conservative Catholic's Perspective