This article is for sysadmins who know better, wanting to Shut down or Restart (or even enter Sleep) over RDP anyway.
Using Command Prompt
Open a Command Prompt
a. To initiate a Shut down, type:
shutdown /s /t 0
then press Enter
OR
b. To initiate a Restart, type:
shutdown /r /t 0
then press Enter
Because of the 0 second delay you specified, you’ll want to be very sure you really intend to do this immediately, before you press that Enter key!
Note: these techniques also work with Microsoft
- Windows Server 2008/2008 R2
- Windows Server 2012/2012 R2
- Windows Server 2016
Src: https://tinkertry.com/how-to-shutdown-or-restart-windows-over-rdp
Psshutdown utility from the Pstools might also come in handy for this king of tasks.
Thanks for sharing and contributing to the alternative one!