No announcement yet.

Close Shadowed RDP session

  • Filter
  • Time
  • Show
Clear All
new posts

  • Close Shadowed RDP session

    Hi, all!!
    In our environment we're provided to the users option connect to server console session while they are logged in through terminal server using shadow command (cmd-shadow <session number>).
    Shadowed session is actually console session, and we're aware about possibility to shut down or logoff option available in start menu which can cause serious damage to production environment. Shadowed session usually opened once user login remotely to the server using preconfigured rdp file and there is only one option to close shadowed session without affecting remote session is pressing "ctrl & *" buttons simultaneity (note * - is on the numeric keyboard, not "shift 8"). I'm pretty sure users will not remember this option... so I'm searching an alternative, for instance create script or shortcut which do the same. VB send keys not working here since it's designed for application and not for windows hot keys. Also tried to use this script:
    FOR /f %%G IN ('query session /sm') DO tsdiscon %%G

    This close all session even console. Tried tsdiscon rdp-tcp#0 option - this work but session is not always 0 and in additional this command disconnect shadowed and rdp session as well and I need option when rdp session remain active once shadowed session closed. So”ctrl & *" is the best solution here… and I'm searching a software option for those hot keys combination. Any help will be much appreciated!!
    Last edited by igor7; 21st September 2013, 22:50.