Deathjam

rdp session reset

Sep 16th, 2013
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. ::::::::::::::::::::::::::::::::::::::::::::
  2. :: Author: Deathjam ::
  3. :: Purpose: RDP Session resets ::
  4. :: Date: 16/09/2013 ::
  5. :: Version: 1.0 ::
  6. ::::::::::::::::::::::::::::::::::::::::::::
  7.  
  8. @echo off
  9.  
  10. Title RDP SESSION DISCONNECT
  11.  
  12. Set /p SERVER=[Insert The Machine Name]
  13.  
  14. :querying
  15.  
  16. cmd /c query session /server:%SERVER%
  17.  
  18. set /p ID=[insert the session id you want to disconnect]
  19.  
  20. cmd /c reset session %ID% /server:%SERVER%
  21.  
  22. set /p CHOICE=[Do you want to reset another? Y/N]
  23.  
  24. If %CHOICE% == Y Goto querying
  25. If %CHOICE% == y Goto querying
  26. If %CHOICE% == n Goto EOF
  27. If %CHOICE% == N Goto EOF
  28.  
  29. :EOF
  30. exit
Advertisement
Add Comment
Please, Sign In to add comment