How do I restart a whole group of computers in AD?
Every once and a while after we push out updates from WSUS the client computers need to be restarted for certain patches. We have always made an announcement and sent emails reminding people to restart their computers before they leave. Often this is not very effective, people forget or are not in the office and I have to manually run around and restart 50 computers. I know there is an easy way to do this (and I do not know how to write a script) I just have not learned about it yet. How do I accomplish this? Thanks in advance!
June 3rd, 2010 3:51pm

Hello, we have created a scheduled task that reboots the machine once in the morning even when running the users aren't effected. Unfortunal the data isn't saved, so at least the users amust be informed about the automatic reboot. Create reboot.cmd and add it as a startup script with the following content: ;Create the scheduled task on remote workstation's if not exist %systemroot%\tasks\at1.job at 05:00 /every:m,t,w,th,f,s,su shutdown.exe /r /t 120 /c "This computer will shutdown and restart automatically, please close your open applications. Your Administrator." /f :Copy the shutdown.exe to remote workstation if not exist %systemroot%\system32\shutdown.exe copy "\\domainname\netlogon\shutdown.exe" "%systemroot%\system32\shutdown.exe"Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2010 4:36pm

Create a txt file with all computer names in the input file. Use the following script to schedule the reboot computers. FOR /f %%i in (c:\computers.txt) do ( shutdown /f /r /t 5 /m \\%%i) http://portal.sivarajan.com/2010/01/change-default-domain-name-log-on-to.html Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided "AS IS" with no warranties, and confers no rights.
June 3rd, 2010 9:08pm

FOR /f %%i in (c:\computers.txt) do ( shutdown /f /r /t 5 /m \\%%i) this gave result oF %%i WAS NOT EXPECTED AT THIS TIME ADVICE
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2011 10:15am

You probably should start a new thread, as this one is old. However, the % characters must be doubled in a bat or cmd file. But if the same command is run at a command prompt, the % characters should not be doubled. Richard Mueller - MVP Directory Services
November 4th, 2011 2:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics