14

When you launch shutdown -i to shutdown a computer from the command prompt (CMD), does it damage the computer that is being turned off (either local or remote)?

  • 21
    Why should it? Do you have any problems after doing this? – user 99572 is fine Jun 11 '16 at 13:06
  • 2
    @user99572isfine: It's a reasonable question. There's no reason to assume that GUI-invoked shutdown is the same mechanism, and there's no reason to assume that just because you haven't seen any problems so far that you never will. – Lightness Races in Orbit Jun 12 '16 at 12:24
  • 1
    Considering what a Charlie Foxtrot Windows' shutdown sequence is in the first place (it hangs permanently if some app has a dialog open, e.g.), and then considering that all modern OSs are designed to recover gracefully if the power plug is pulled, why would you think some command other than ** sudo rm -rf C:/ ** would be a problem? – Carl Witthoft Jun 12 '16 at 12:27
35

The shutdown command in Windows performs a normal shutdown/reboot/logoff on the computer (local or remote). If you did close all your running programs and saved your files, there's no difference between running any shutdown command (with any parameter) or using the windows user interface from the Start menu, and the command doesn't damage the computer or filesystem in any way.

More about running programs: if some programs preventing the shutdown are running, Windows will automatically try to terminate them, and, if that isn't possible, it will prompt you about it. The only problem you can have here arises for programs performing unsaved changes to files: if they provide an automatic recovery of not properly closed sessions (e.g. like Microsoft Office) they will save their state to recover it on the next start, otherwise you'll lose the unsaved data.

  • The wording is a bit strange. It gives the feeling that Microsoft Office saves states. As far as I know, until office 2013, that didn't exist. – Ismael Miguel Jun 11 '16 at 21:07
  • @IsmaelMiguel actually, that has been implemented since Office 2007 – Marco Bonelli Jun 11 '16 at 21:09
  • That is actually very strange, since I never saw it working. Maybe I need an update :/ – Ismael Miguel Jun 11 '16 at 21:09
  • 1
    @IsmaelMiguel I don't know, I saw it at work on my old 2007 version and it's also documented on the Microsoft site here – Marco Bonelli Jun 11 '16 at 21:11
  • 2
    @IsmaelMiguel, It has been an option for far longer than Office 2007. I am certain it exists in Office 2003 (one machine currently using it). I do not know when it was first introduced. But it is, after all, not even remotely a new concept. – Makyen Jun 11 '16 at 21:59
20

No it won't.

When you use the start menu to shutdown the computer, it will also use the same shutdown command, just with different parameters.

The shutdown -i option was made to expose features that the normal windows startmenu does not offer without requiring to use commandline. For example, shutdown -i can be used to send a shutdown command to another PC.

In a similar fashion that shutdown -i won't damage your computer, neither will shutdown -s -t 0.

There is also the -f option, which is to force a shutdown. This will not damage your windows, but it may cause any unsaved data (such as an open word document that was not saved) to be lost.

Normally windows will show you a dialog with: There's a program preventing a shutdown. Do you want to cancel or continue anyway? A timeout will eventually abort the shutdown. With the -f option, instead of showing the message, it will assume the "continue anyway" and close any remaining programs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.