-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestartMachines.bat
More file actions
26 lines (20 loc) · 898 Bytes
/
RestartMachines.bat
File metadata and controls
26 lines (20 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
:: How to run ?
:: Enter machine names and double click this file to run.
TIMEOUT /T 120
:: /r - For restart
:: /f - Force kill all running application
:: /m \\machinename - Implies we are gonna pass a remote machine name
:: /t x - Timer in seconds
:: /d [u][p] :xx:yy
:: List the reason code for the shutdown or restart. The following table lists the different values.
:: p will list a Planned reason code.
:: u will list a User Defined reason code.
:: If neither p nor u is specified the restart or shutdown is unplanned.
:: xx = The Major reason code (0-255)
:: yy = The Minor reason code (0-65535)
:: 4:1 - For application maintenance
:: Refer for more information: https://ss64.com/nt/shutdown.html
shutdown /r /f /m \\MachineName1 /t 1 /d P:4:1
shutdown /r /f /m \\MachineName2 /t 1 /d P:4:1
shutdown /r /f /m \\MachineName3 /t 1 /d P:4:1
pause