Check who is logged into a machine
by, 9th February 2012 at 01:24 AM (5003 Views)
From time to time you may wish to find out who is logged into a machine. I find this batch file handy for doing this. Its quick, simple and easy.
Just copy and paste the below code into notepad and save the file as who.bat
Now open the command prompt. run to the location of the script then a space then the name of the machine. For exampleCode:@echo off :CHECK echo Checking Connection ... ping %1 -n 1 | findstr "TTL=" >nul && GOTO MAIN || GOTO ERROR GOTO END :ERROR echo Device Unreachable GOTO END :MAIN wmic /node: "%1" computersystem get username GOTO END :END echo.
Total Trackbacks 0