Drop the following in to a file named, e.g., "list-offline-clients.bat", and either double click it, or run it from a DOS/cmd box.
@echo off
setlocal enabledelayedexpansion
set z_path=%~dp0
set z_name=%~n0
set z_file_log=!z_path!!z_name!.log
set z_file_tmp=!z_path!!z_name!.tmp
call :log ""
call :log ""
call :log "Script started..."
set z_bpclient_exe=C:\Program Files\Veritas\NetBackup\bin\admincmd\bpclient.exe
if not exist "!z_bpclient_exe!" (
call :log "Unable to locate executable `!z_bpclient_exe!`..."
goto :end
)
"!z_bpclient_exe!" -All -L >"!z_file_tmp!"
set /a z_count_offline=0
for /f "tokens=1,2,3" %%a in ('type "!z_file_tmp!"') do (
if /i "%%a %%b"=="Client Name:" set z_client_name=%%c
if /i "%%a %%b"=="Offline: Yes" (
set /a z_count_offline+=1
call :log "Offline client: !z_client_name!"
)
)
call :log ""
call :log "Found `!z_count_offline!` offline clients..."
:end
call :log ""
call :log "Script completed..."
echo+
pause
exit /b
:log
(echo !date! !time:~0,8! %~1)
(echo !date! !time:~0,8! %~1)>>"!z_file_log!"
goto :eof
HTH.