Answer the question
In order to leave comments, you need to log in
How to write a script to shutdown servers?
Good afternoon. There are two win2008r2 servers. You need to write a script to turn them off. First one turns off, after 15 seconds the second.
As I understand it, it is necessary to give users the ability to work with power through group policies.
Then duplicate user accounts on the second server so as not to reveal the admin password, and create *.bat with the following content:
shutdown -s -t 0 -f -m \\xxx.xxx.xxx.xxx
sleep 15
shutdown -s -t 0 -f -m \\xxx.xxx.xxx.xxx
Answer the question
In order to leave comments, you need to log in
Why Sleep 15 if you can
shutdown -s -t 15 -f -m \\xxx.xxx.xxx.xxx (this is the second one)
shutdown -s -t 0 -f -m \\xxx.xxx.xxx.xxx (this first)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question