TransWikia.com

Is "shutdown /p" the most aggressive "turn off the computer instantly" command for Windows 10?

Super User Asked by Currin Samand on November 18, 2021

I’m implementing a security mechanism which basically is supposed to "cut the power" to my computer after a certain time of inactivity. After lots of reading and testing, I’ve come to the conclusion that this seems to be the best and only command I could use:

shutdown /p

Ideally, my system should of course also communicate wirelessly to a physical device which literally cuts the power, but that’s beyond my abilities in several ways.

According to the manual:

/s = Shutdown the computer.
/p = Turn off the local computer with no time-out or warning.
/f = Force running applications to close without forewarning users.

I think I tried to use /f as well, but that made it not work at all, or something. It was confusing, and it’s difficult to test this since, well, the machine shuts down each time. The /s, /p and /f all seem pretty redundant, especially /p and /f.

I’m trying to avoid a situation where my script kicks in but then the computer doesn’t actually shut down after all, for whatever reason. My current command seems to ignore "Do you want to save the unsaved document?" dialogue boxes which block the shutdown in normal cases, so that’s good, but I can’t be sure that it really works in all situations; there could be other things which "block" the shutdown, and I wish to eliminate all such possibilities, if possible.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP