Apr 062010
 

PSLoggedOn.exe

@echo off
REM Program Author: Robert Holland
REM Program Purpose: Display the username that is logged onto the computer.
REM Program Date: 20100406

if {“%1”} == {} goto :HelpMe
if {%1} == {^/^/} goto :HelpMe
if {%1} == {^/?} goto :HelpMe
if {%1} == {^/h} goto :HelpMe
if {%1} == {-h} goto :HelpMe

if NOT {%1} == {} (
psloggedon.exe -x \\%1)else goto HelpMe
goto :eof

:HelpMe
cls
@echo “Usage: loggedon targetcomputername”