contains UsrStat, which will produce a multi-domain-controller report, but each domain controller is listed separately. It still requires substantial manual work to find the last logon. JSIUsrStat.bat uses UsrStat to produce the subject report.

The syntax for using JSIUsrStat.bat is:

JSIUsrStat ReportFile DomainName         where:

ReportFile is the full path to the output file.
DomainName is your Windows NT domain name.

The following is a report snapshot:

<b>Jennifer               1999 04 28 14:47:45 Wed \\JSI01         Jennifer Schulman              
JERRY                  1999 04 29 23:56:58 Thu \\JSI02         Jerold Schulman                
Opalis                 1999 04 29 23:39:57 Thu \\JSI02         OpalisRobot                    
ULTRABAC               1999 04 29 23:39:38 Thu \\JSI01         ULTRABAC</b>
JSIUsrStat.bat contains:
<b>@echo off
setlocal
if "%1"<h1><a name="_goto_syntax_if_2_">"" goto syntax
if "%2"</a></h1>"" goto syntax
goto begin
:syntax
@echo Syntax: JSIUsrStat File Domain
goto end
:begin
set file=%1
if exist %file% del /q %file%
set file=%file:"=%
set wrk1=%~DPN1.tm1
set wrk2=%~DPN1.tm2
set file="%file%"
set wrk1="%wrk1%"
set wrk2="%wrk2%"
if exist %wrk1% del /q %wrk1%
set luser=
for /f "Tokens=*" %%i in ('usrstat %2') do call :parse "%%i"
@echo ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ >> %wrk1%
sort  %wrk2%
del /f /q %wrk1%
for /f "Tokens=*" %%i in ('type %wrk2%') do call :report "%%i"
del /f /q %wrk2%
endlocal
goto end
:report
set str=%1
set str=%str:"=%
if "%luser%"<h1><a name="_set_luser_str_amp_goto_end_if_luser_0_20_">"" set luser=%str%&goto end
if "%luser:~0,20%"</a></h1>"%str:~0,20%" set luser=%str%&goto end
@echo %luser% >> %file%
set luser=%str%
goto end
:parse
set str=%1
set str=%str:"=%
set str=%str:     - =No Name#%
set str=%str: - =# %
set str=%str:# logon=#logon%
for /f "Tokens=1-2* Delims=#" %%i in ('@echo %str%') do call :parse1 "%%i" "%%j" "%%k"
goto end
:parse1
set user=%1
set name=%2
set last=%3
set user=%user:"=%                                                             #
set user=%user:~0,22%
set name=%name:"=%                                                             #
set name=%name:~1,30%
set last=%last:"=%
set last=%last:~6,25%
if /i "%user:~0,9%"<h1><a name="_Users_at_set_dc_user_9_15_#_amp_goto_parse2_if_i_last_1_5_">"Users at " set dc=%user:~9,15%                           # & goto parse2
if /i "%last:~1,5%"</a></h1>"Never" goto end
set mon=%last:~5,3%
set day=%last:~9,2%
set year=%last:~21,4%
set time=%last:~12,8%
set dayw=%last:~1,3%
if /i "%mon%"<h1><a name="_Jan_set_mon_01_amp_goto_out_if_i_mon_">"Jan" set mon=01&goto out
if /i "%mon%"</a></h1>"Feb" set mon=02&goto out
if /i "%mon%"<h1><a name="_Mar_set_mon_03_amp_goto_out_if_i_mon_">"Mar" set mon=03&goto out
if /i "%mon%"</a></h1>"Apr" set mon=04&goto out
if /i "%mon%"<h1><a name="_May_set_mon_05_amp_goto_out_if_i_mon_">"May" set mon=05&goto out
if /i "%mon%"</a></h1>"Jun" set mon=06&goto out
if /i "%mon%"<h1><a name="_Jul_set_mon_07_amp_goto_out_if_i_mon_">"Jul" set mon=07&goto out
if /i "%mon%"</a></h1>"Aug" set mon=08&goto out
if /i "%mon%"<h1><a name="_Sep_set_mon_09_amp_goto_out_if_i_mon_">"Sep" set mon=09&goto out
if /i "%mon%"</a></h1>"Oct" set mon=10&goto out
if /i "%mon%"=="Nov" set mon=11&goto out
set mon=12
:out
@echo %user% %year% %mon% %day% %time% %dayw% %dc% %name% >> %wrk1%
goto end
:parse2
set dc=%dc:~0,15%
:end</b>