(view source code of invshare.bat as plain text)
@ECHO OFF
SETLOCAL
:: Check for valid command line parameter
IF [%1]==[] GOTO Syntax
ECHO.%1 | FIND "?" >NUL
IF NOT ERRORLEVEL 1 GOTO Syntax
:: Remove leading backslashes
FOR /F "tokens=1* delims=\ " %%A IN ('ECHO.%1') DO SET server=%%A
IF NOT DEFINED server GOTO Syntax
:: Check if parameter is a valid server name
NET VIEW \\%server% >NUL 2>NUL
IF ERRORLEVEL 1 GOTO Syntax
:: Read Event Log entries
DUMPEL -e 2511 -l system -m server -s %server%
GOTO End
:Syntax
ECHO.
ECHO InvalidShares.cmd, Version 1.00 for Windows NT
ECHO Show log entries concerning invalid shares for specified server
ECHO Written by Rob van der Woude
ECHO.
ECHO Usage: %~n0 ^<server_name^>
ECHO.
ECHO Uses DUMPEL.EXE from the Microsoft Windows NT 4 Server Resource Kit
:End
ENDLOCAL
page last modified: 2024-04-16; loaded in 0.0097 seconds