Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
:: BATCH SCRIPT START @ECHO OFF SETLOCAL EnableDelayedExpansion SET InputFile=Machines.txt SET OutputFile=SRSDisableStatus.txt IF NOT EXIST "%InputFile%" ECHO "%InputFile%" file does not exist. &GOTO :EndScript FOR %%R IN ("%InputFile%") DO IF %%~zR EQU 0 ECHO "%InputFile%" file is empty. &GOTO :EndScript IF EXIST "%OutputFile%" DEL /F /Q "%OutputFile%" FOR /F %%c IN ('TYPE "%InputFile%"') DO ( ECHO Processing: %%c PING -n 1 -w 1000 %%c|Find /I "TTL" >NUL IF NOT ERRORLEVEL 1 ( SC \\%%c STOP "srservice" >>%OutputFile% SC \\%%c config "srservice" start= disabled >>%OutputFile% )ELSE (ECHO Unable to connect %%c: system may be offline.)) ECHO. &ECHO Script complete. Check "%OutputFile%" file. :EndScript ENDLOCAL EXIT /B 0 :: BATCH SCRIPT END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.