Skip to content

Instantly share code, notes, and snippets.

@cainejunkazama
Created August 7, 2013 21:40
Show Gist options
  • Save cainejunkazama/6179009 to your computer and use it in GitHub Desktop.
Save cainejunkazama/6179009 to your computer and use it in GitHub Desktop.
mode con:cols=90 lines=25
@echo off
title=Remote Kill ^| © 2012 Ryan Jones v0.01
:start
set sessionid=
set host=
:enterhn
color 0F
cls
echo.
echo R E M O T E S E S S I O N L O G O F F
echo.
echo.
set /p host=Host to check:
if '%host%'=='' cls&&echo.&&echo R E M O T E S E S S I O N L O G O F F&&echo.&&echo.&&echo you
must enter a hostname to continue&&Echo.&&pause>nul&&goto enterhn
echo.
echo.
quser /server:%host%
echo.
echo.
set /p sessionid=Enter in a session ID to kill or press enter to return to the start:
if '%sessionid%'=='' goto start
logoff /server:%host% %sessionid% /v
echo.
echo Press enter to check another server
pause>nul
goto start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment