Created
August 7, 2013 21:40
-
-
Save cainejunkazama/6179009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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