Restart Windows remotely

There are times when you want to reboot your PC remotely.
Especially when you telework a lot in Covid19 like now, PC troubles increase.
In such cases, you can reboot the target PC from another PC with a command.

If the IP address of the PC you want to reboot is, you can reboot the remote destination as follows.
To do this, you need to be able to communicate with the PC you want to reboot by pinging, etc., and the operating PC must be a Windows PC (because it needs to be able to execute the following commands).

C:> shutdown /m /r /f 

If you get the message “ Access denied. (5)” is displayed, perform the following.

C:> net use \ /user:[Administrator user of the PC to be connected] [Password]  
The command has completed successfully.

When the above message is displayed, execute the following again to reboot.

C:> shutdown /m /r /f