In the Windows command line, the command to restart the machine is shutdown-r-F-T 30.
If you want to enable remote restart, add the parameter-M, for example, restart the remote machine + reason for shutdown + force close all running applications Program+ Set the timeout to 1 minute: shutdown/m \ computername/R/f/C "computers will restart in 1 minute, please save any work. system Administrator "/T: 120 to remotely shut down or restart the machine, you must have the administrator privilege on the remote machine. The two methods are as follows: 1) Add the login user of the machine on which shutdown is executed to the local administrator Group of the remote machine; 2) modify the Group Policy to add user permissions, as shown below: 1. in the Group Policy Editor, choose computer configuration> Windows Settings> Security Settings> Local Policies> User Rights Assignment"
2. Select Force Shutdown From Remote System in the right pane of the Group Policy window and double-click it to open it.
3. Click "add user or group" at the bottom of the dialog box to add a user that can be shut down remotely.
You can also restart remote machines in batches using the following bat: @ echo off
For/F "tokens = 1" % I in (computers.txt) Do ^
Shutdown-s-t 30-F-m \ % I or you can set a scheduled Restart for a remote machine on the local machine:
At 23:00/every: M, T, W, Th, F shutdown/R/m \ computername
You can also restart a remote machine in the GUI: shutdown-I
You can also use the tool psshutdown and use different user names and passwords to restart remote machines:
Complete!