There will be times as a Windows Administrator that you will need to restart remote computer or server. In this tutorial, I’ll show you two easy methods for rebooting remote computers.
A remote computer cannot be restarted using the command line if it is not configured properly and if it is not connected to the same network as another computer.
Sit behind the computer you want to restart (hereinafter referred to as the remote computer). Do this to configure the computer to execute the remote instructions.
Open the Start menu. To do this, click on the Windows logo in the lower left corner of the screen.
In the search bar of the Start menu, type services. So you will find the “Services” utility.
Click the Service utility icon. It looks like a gear and appears at the top of the Start menu. The Services window opens. If you do not see the icon, enter services.msc so that it appears.
Scroll down and click Remote Registry. This option is located in the "R" section of the main window. Clicking on the “Remote Registry” option will highlight it.
Click the "Properties" icon. It has a gray square with a folder and is located under the “View” tab at the top of the window. The "Options" window will open.
Open the start-up type drop-down menu. It is in the middle of the window.
Select Automatic. Click “Automatic” in the drop-down menu.
Click on OK. This button is located at the bottom of the window. This will enable the remote reboot feature on the computer.
Open the Start menu. Do this on a remote computer (and not on the computer from which the command will be sent to reboot).
In the search bar of the Start menu, enter a "Firewall". So you will find the program "Windows Firewall".
Click the Windows Firewall icon. It looks like a brick wall with a globe. You will find this icon at the top of the Start menu.
Click Allow an app or feature through Windows Firewall. This link is in the upper left corner of the window. A list of all programs and services opens.
Click Change Settings. This option is located in the upper right corner above the list of programs. A list of programs opens.
Scroll down and find the "Windows Management Instrumentation (WMI)". You will find this option at the bottom of the program list.
Check the box next to Windows Management Instrumentation. Make it to the left of the specified option. If the computers on which you work are connected to the public network, check the box in the “Public” column to the right of the “Windows Management Instrumentation” option.
Click on OK. This button is located at the bottom of the window. Now the firewall will not block remote access to the computer.
Open the Start menu. Do this on a remote computer (and not on the computer from which the command will be sent to reboot).
Open a Windows Explorer. To do this, click on the icon in the form of a folder in the "Start" menu.
Click This Computer. This icon is in the form of a computer on the left side of the Explorer window.
Click the Computer tab. This option is located in the upper left of the window. The toolbar opens.
Click Properties. This is a red checkmark icon on a white background, which is located on the left side of the toolbar. The computer settings will open.
Write down the name of the computer. You will find it in the "Computer name" line of the "Computer name, domain and workgroup" section in the middle of the page. Write the name of the computer exactly as it appears in the line.
Sit at another computer. It must be connected to the same network as the remote computer. Log in as an administrator.
Open the Start menu. To do this, click on the Windows logo in the lower left corner of the screen.
In the search bar of the Start menu, type a Command prompt. So you will find the command line utility.
Click the command line icon. It is located at the top of the Start menu.
Type shutdown / i
at the command prompt, and then press ↵ Enter. A window will open in which you can restart the remote computer.
Click Add. This option is located on the right side of the window. A new window will open.
Enter the name of the remote computer. Do this in the corresponding text box. If you have not yet found the name of the remote computer, do it now (read the previous section). And click on OK
Make sure the "Restart" option is selected. In the "Select the desired action for computers" section, open the drop-down menu and select the "Restart" option. If necessary, check the box “Warn users of the action” and select the time during which the warning will be displayed on the screen. Then click OK
This command will immediately restart a remote computer. The -Force option will force a restart even if a user is logged on:
Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force
This is handy if you have several computers to restart. Just list all the computers you want in a text file and add that to the PowerShell command:
restart-computer (get-content c:\work\computers.txt)
Also consider using Action1 to restart remote computer if: