apagar windows desde consola 1

apagar windows desde consola

//En linea de comandos de Windows: (CMD)
shutdown /p

Here is what the above code is Doing:
1. We import the os module.
2. We use the os.system() function to call the shutdown command.
3. We pass the /s option to the shutdown command. This option tells the computer to shut down.
4. We pass the /t option to the shutdown command. This option tells the computer to wait x seconds before shutting down.
5. We pass the 0 option to the shutdown command. This option tells the computer to wait 0 seconds before shutting down.

Similar Posts