List Windows Running Tasks Remotely via Command Line

By | September 22, 2016

If you have the local “administrator” account for a Windows PC, you can run the batch script below to list the running tasks. This script will actually run for the local PC (localhost) or it can connect to another machine over the network as long as you know that machine’s local admin password.

@ECHO OFF
REM Written by VeneDude
REM mode con lines=60 >nul
TITLE Running Tasks Util
COLOR 18
cls
set /p HostName="Host: "
set /p Password="Administrator Password: "
echo ...

:checkTsks
tasklist /S %HostName% /U %HostName%\administrator /P %Password%
choice /c rq /n /m "(r)efresh (q)uit: "
if errorlevel 2 goto end
if errorlevel 1 goto checkTsks

:end
exit

To use, you can just copy/paste the script above to a new batch file (ex. checkTasks.bat) and double-click to run.