astorrs wrote: Since its only 50 clients, why not use "shutdown -r -m \\computername" to reboot them all from a single computer. Use a VBScript (or a batch file with a for loop) to execute it for each of the computers (stored in a text file perhaps?). It will be much easier to administer from one machine than 50. If you need some help in figuring out the details, just let us know.
the_erickee wrote: We are actually trying to keep it local on each machine. Any other ideas?
the_erickee wrote: ^^ Lol. yeah that might work. I think we are going to have to just go around to everyone's pc and set it up manually. Oh well. Thanks for the responses!
astorrs wrote: the_erickee wrote: We are actually trying to keep it local on each machine. Any other ideas? If you insist on having each machine perform its own automatic reboot, I would use schtasks.exe to create the scheduled tasks on each of the machines (it can just run "shutdown -r") from a single machine. Again you can either manually type the command to create the scheduled task, or you can use the aforementioned FOR loop or script to create them.
ranjitcool wrote: astorrs wrote: the_erickee wrote: We are actually trying to keep it local on each machine. Any other ideas? If you insist on having each machine perform its own automatic reboot, I would use schtasks.exe to create the scheduled tasks on each of the machines (it can just run "shutdown -r") from a single machine. Again you can either manually type the command to create the scheduled task, or you can use the aforementioned FOR loop or script to create them. oh dear.. i didnt read this that he had already mentioned about this.. oopsy! and now i did , its a pretty good explanation of what was on my mind.. thanks rj
astorrs wrote: the_erickee wrote: ^^ Lol. yeah that might work. I think we are going to have to just go around to everyone's pc and set it up manually. Oh well. Thanks for the responses! Maybe you missed my previous post. Run the following from a single computer and it will create local scheduled tasks on each of them. You will need to set the /U and /P switches to a domain administrator account (or at least one with admin privs on each of the clients), for the /RU and /RP switches you want to set the service account you want to use actually run the scheduled task under. Then just change <Computer> to the name of each client, run it from a command prompt, hit the up arrow, change the client name, hit enter, repeat x 50. Much faster.schtasks /Create /U <DOMAIN\Administrator> /P <Password> /RU <DOMAIN\Account to run task under> /RP <Password> /SC DAILY /TN "Daily Reboot" /TR "shutdown.exe -r -f" /ST 00:00:00 /S <Computer>
the_erickee wrote: I did read it but we dont want to place the admin pw in plain text. we are a nonprofit government agency and this script is going on government systems to comply with security agreements. sorry for leaving out so much detail.
astorrs wrote: Then just change <Computer> to the name of each client, run it from a command prompt, hit the up arrow, change the client name, hit enter, repeat x 50. Much faster.schtasks /Create /U <DOMAIN\Administrator> /P <Password> /RU <DOMAIN\Account to run task under> /RP <Password> /SC DAILY /TN "Daily Reboot" /TR "shutdown.exe -r -f" /ST 00:00:00 /S <Computer>
for /L %C in (10,1,50) do schtasks /Create /U <DOMAIN\Administrator> /P <Password> /RU <DOMAIN\Account to run task under> /RP <Password> /SC DAILY /TN "Daily Reboot" /TR "shutdown.exe -r -f" /ST 00:00:00 /S 192.168.1.%C
for /F %C in (C:\temp\computernames.txt) do schtasks /Create /U <DOMAIN\Administrator> /P <Password> /RU <DOMAIN\Account to run task under> /RP <Password> /SC DAILY /TN "Daily Reboot" /TR "shutdown.exe -r -f" /ST 00:00:00 /S 192.168.1.%C
undomiel wrote: I was waiting for sprkymrk and his love of the FOR loop to jump in on this.
the_erickee wrote: IT WORKS!! Thanks guys. You made my job easy again. lol. This site is amazing. I love it!
for /F %%C in (C:\temp\computernames.txt) do schtasks /Create /U <DOMAIN\Administrator> /P <Password> /RU <DOMAIN\Account to run task under> /RP <Password> /SC DAILY /TN "Daily Reboot" /TR "shutdown.exe -r -f" /ST 00:00:00 /S 192.168.1.%%C