Using the NET VIEW command, and Psloggedon freeware, I scripted DULO.bat to report which domain users are logged onto the desktops of domain computers.
DULO.bat has no parameters. It displays the computer name and user name of all domain users currently logged on to the same domain as the user running DULO.bat from their workstation.
DULO.bat contains:
@echo off setlocal for /f "Tokens=1" %%c in ('net view /domain:"%USERDOMAIN%"^|Findstr /L /C:"\\"') do ( for /f "Tokens=*" %%u in ('PsLoggedOn -L %%c^|find /i "%USERDOMAIN%\"') do ( call :report %%c "%%u" ) ) endlocal goto :EOF :report set work=%1 set comp=%work:~2% set user=%2 set user=%user:"=% call set user=%%user:*%USERDOMAIN%\=%% @echo %comp% %user%
0 comments
Hide comments