1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| @echo off
set domainController=DESKTOP-MQ0RV6A set resultFile=domain_status.txt
:checkDomain ping %domainController% -n 1 >nul if errorlevel 1 ( ( echo Line 1: Domain %domainController% is not available. echo Line 2: Additional information if needed. echo Line 3: More information. ) > %resultFile% ) else ( ( echo Line 1: Domain %domainController% is available. echo Line 2: Additional information if needed. echo Line 3: More information. ) > %resultFile% )
|