1.

Solve : dos shutdown command?

Answer» <html><body><p>I am trying to shutdown 157 windows <a href="https://interviewquestions.tuteehub.com/tag/xp-747558" style="font-weight:bold;" target="_blank" title="Click to know more about XP">XP</a> <a href="https://interviewquestions.tuteehub.com/tag/workstations-1460165" style="font-weight:bold;" target="_blank" title="Click to know more about WORKSTATIONS">WORKSTATIONS</a> using the following bat <a href="https://interviewquestions.tuteehub.com/tag/file-11330" style="font-weight:bold;" target="_blank" title="Click to know more about FILE">FILE</a>.<br/>"shutdown -r -f -c " Automatic system restart has been called for by the system administrator. Shutdown will <a href="https://interviewquestions.tuteehub.com/tag/begin-389976" style="font-weight:bold;" target="_blank" title="Click to know more about BEGIN">BEGIN</a> in 30 seconds".<br/><br/>Can I use wildcards and the -m \\abc** for system names.<br/><br/>Example "abc**" for system named abc01, abc02 ect.<br/>I only want to shut down and restart certian pc's in the domain.<br/><br/>The domain server is running Server 2003.<br/><br/>ThanksYou can't use wildcards for the shutdown command, but you could probably do something like this in a batch file:<br/><br/>Code: <a>[Select]</a>@echo off<br/>for /f "tokens=*" %%a in ('net view ^| findstr /i /b "\\\\abc"') do (<br/> echo Rebooting %%a<br/> shutdown.exe -r -f -m "%%a" -c " Automatic system restart has been called for by the system administrator. Shutdown will begin in 30 seconds"<br/>)<br/>As with all batch scripts, this should be tested in a controlled environment before run on a live network.</p></body></html>


Discussion

No Comment Found