@echo off REM THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF REM ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO REM THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A REM PARTICULAR PURPOSE. REM Copyright (C) 2004 Microsoft Corporation. All Rights Reserved. REM ************************************************************************ REM ************************************************************************ REM repadmin-showrepl.cmd REM REM Tests to make sure the DC has appropriate DC services running REM REM Caller REM Called by RunBROFMON.cmd REM REM Main tasks performed are REM Ensure the AD replication is running REM REM Usage REM This script is not normally ever called by the end user. REM ************************************************************************ REM ************************************************************************ REM REM Run test REM "%BROFMON_toolsdir%\repadmin.exe" /showrepl > "%BROFMON_tempdir%\repadmin-showrepl.log" REM REM Check log for 'error, failed or never' string REM call findstr /I "error failed never" "%BROFMON_tempdir%\repadmin-showrepl.log" if "%ERRORLEVEL%"=="0" ( ECHO Test Failed ECHO. ECHO.Copy log file into report directory ECHO. Source: "%BROFMON_tempdir%\repadmin-showrepl.log" ECHO. Target: "%BROFMON_reportsdir%\repadmin-showrepl.log" copy /Y "%BROFMON_tempdir%\repadmin-showrepl.log" "%BROFMON_reportsdir%\repadmin-showrepl.log" ECHO. ECHO.Generate MOM notification ECHO. Target: "%BROFMON_momlog%" ECHO. Value: repadmin-showrepl has failed on %COMPUTERNAME%. Check "%BROFMON_CentralReportingDirectory%\repadmin-showrepl.log" for more information. ECHO.repadmin-showrepl has failed on %COMPUTERNAME%. Check "%BROFMON_CentralReportingDirectory%\repadmin-showrepl.log" for more information.>>"%BROFMON_momlog%" ECHO. ECHO.Generate result file ECHO. Target: "%BROFMON_reportsdir%\repadmin-showrepl.result" ECHO. Value: 1 [FAILED] ECHO.1>"%BROFMON_reportsdir%\repadmin-showrepl.result" ) else ( echo Test Passed ECHO. ECHO.Generate result file ECHO. Target: "%BROFMON_reportsdir%\repadmin-showrepl.log.result" ECHO. Value: 0 [PASSED] echo.0>"%BROFMON_reportsdir%\repadmin-showrepl.result" )