Shutdown/Restart windows using command-line through RDP

For shutting down…

C:\Windows\System32\shutdown.exe -s -t 20 -c "Bye" -f -d p:0:0

For rebooting…

C:\Windows\System32\shutdown.exe -r -t 20 -c "Restarting" -f -d p:0:0

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.