xxxxxxxxxx
shutdown -s -f -t 3600 // replace with any amount in seconds
forces a shut down in 3600 seconds (1 hour)
shutdown -s
Shut down PC immediately
shutdown -a
Abort shutdown
shutdown -r
Restart computer
shutdown -l
Log off current user
shutdown -f
Force shutdown: forces the running application to close (the user receives no advance warning)
xxxxxxxxxx
# Schedule an automatic shutdown (7200 = seconds)
shutdown /s /t 7200
# Cancel Auto Shutdown Schedule
shutdown -a
xxxxxxxxxx
shutdown -s -t 30
Note: 30 equals how many seconds you want it to take before shutting down
xxxxxxxxxx
In CMD for Windows 10 and 11:
shutdown /s (shuts down)
shutdown /r (restarts)
shutdown /i (opens UI for remote shutdown)
xxxxxxxxxx
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
system("C:\\WINDOWS\\System32\\shutdown /s");
}