ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

Vista's SHUTDOWN Command

Allows proper local or remote shutdown of machine.

SHUTDOWN [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

No args
Display help. This is the same as typing /?
/?
Display help. This is the same as not typing any options.
/i
Display the graphical user interface (GUI). (This must be the first option.)
/l
Log off. This cannot be used with /m or /d options.
/s
Shutdown the computer.
/r
Shutdown and restart the computer.
/g
Shutdown and restart the computer. After the system is rebooted, restart any registered applications.
/a
Abort a system shutdown. (This can only be used during the time-out period.)
/p
Turn off the local computer with no time-out or warning. (Can be used with /d and /f options.)
/h
Hibernate the local computer. (Can be used with the /f option.)
/e
Document the reason for an unexpected shutdown of a computer.
/m
\\computer Specify the target computer.
/t xxx
Set the time-out period before shutdown to xxx seconds. (The valid range is 0-600, with a default of 30. Using /t xxx implies the /f option.
/c “comment”
Comment on the reason for the restart or shutdown. (Maximum of 512 characters allowed.)
/f
Force running applications to close without forewarning users. (/f is automatically set when used in conjunction with /t xxx.)
/d [p|u:]xx:yy
Provide the reason for the restart or shutdown.

  • p indicates that the restart or shutdown is planned.
  • u indicates that the reason is user defined.
  • if neither p nor u is specified the restart or shutdown is unplanned.

  • xx is the major reason number (positive integer less than 256).
  • yy is the minor reason number (positive integer less than 65536).

Reasons on this computer:
(E = Expected U = Unexpected P = planned, C = customer defined)

Type    Major   Minor   Title

 U      0       0       Other (Unplanned)
E       0       0       Other (Unplanned)
E P     0       0       Other (Planned)
 U      0       5       Other Failure: System Unresponsive
E       1       1       Hardware: Maintenance (Unplanned)
E P     1       1       Hardware: Maintenance (Planned)
E       1       2       Hardware: Installation (Unplanned)
E P     1       2       Hardware: Installation (Planned)
  P     2       3       Operating System: Upgrade (Planned)
E       2       4       Operating System: Reconfiguration (Unplanned)
E P     2       4       Operating System: Reconfiguration (Planned)
  P     2       16      Operating System: Service pack (Planned)
        2       17      Operating System: Hot fix (Unplanned)
  P     2       17      Operating System: Hot fix (Planned)
        2       18      Operating System: Security fix (Unplanned)
  P     2       18      Operating System: Security fix (Planned)
E       4       1       Application: Maintenance (Unplanned)
E P     4       1       Application: Maintenance (Planned)
E P     4       2       Application: Installation (Planned)
E       4       5       Application: Unresponsive
E       4       6       Application: Unstable
 U      5       15      System Failure: Stop error
E       5       19      Security issue
 U      5       19      Security issue
E P     5       19      Security issue
E       5       20      Loss of network connectivity (Unplanned)
 U      6       11      Power Failure: Cord Unplugged
 U      6       12      Power Failure: Environment
  P     7       0       Legacy API shutdown

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Related Posts

Comments

  • THMA

    May 20, 2007 at 10:35 pm

    i hate that the shutdown /t is limited to 600 seconds.

  • nevetsg

    May 23, 2007 at 3:22 am

    set up a scheduled task then…

  • THMA

    May 24, 2007 at 10:35 am

    takes more to make a scheduled task then just to:

    Win+R
    cmd
    shutdown.exe /h /t 7200

    That or a .bat on the desktop. Its not like they didn’t have it supported before. They did and in their infinite wisdom they decided 10 minutes was long enough…..

  • Someone you know

    Aug 19, 2007 at 9:42 pm

    I am trying to do shutdown /m \\computer /f but brings the ? up again what do i put to get it to work

  • nevetsg

    Aug 20, 2007 at 3:04 am

    Silly question #1, are you trying to shutdown the PC you are using or a different one on the network?

    silly question #2, if it is a different PC in the “\\computer” section you are typing in the name of that other PC (or its IP should do) or leaving it saying “computer”??

  • Someone you know

    Sep 4, 2007 at 10:16 pm

    i am puting in all the info like computer name instead of computer and it is a different computer

    it says access is denied(5)

  • The @$$

    Sep 19, 2007 at 5:09 pm

    Lol how do you even find out names of computers on the netwrk? I’m a noob when it comes to the command prompt, so… can someone please answer me?

  • Joe

    Sep 27, 2007 at 2:45 pm

    I don’t have a Vista machine in front of me at the moment, but I think you can get it by either right clicking the Computer icon and choosing properties, or at the command prompt, typing ipconfig /all. I’m sure there are tons of other ways as well, feel free anyone to suggest a better one!

  • Algis

    Oct 2, 2007 at 10:14 pm

    computer names:
    your computer :
    winkey+r
    cmd + enter
    ipconfig /all
    you will see something like ” Host Name . . . . . . . . . . . . : SDF-1″

    other computers:
    ping -a x.x.x.x “ip” if you have it

  • Geric George

    Oct 31, 2007 at 8:25 am

    If it’s saying “access is denied” then make sure you have an account in the remote computer, if it’s a different usr/pwd then try opening a shared folder, so you can authenticate the usr/pwd for the remote computer. If still doesn’t work, you’ll have to to check the privileges in the remote computer, the coolest way of doing this (at least that i know, if you’re using Pro, will not work in Home) is Start > Run > gpedit.msc

  • Vivian Farrell

    Jan 10, 2008 at 6:24 am

    I am flabagasted at the fact that Microsoft has limited the timed shutdown to 10 minutes. I frequently use the timed shutdown feature to turn off my pc after I’ve gone to work if I am downloading something large or running a long task. Using the scheduler is a pain. I’d rather just ctrl+r and auto complete my shutdown command. It’s little things like this that will make my revert to XP.

  • Jon

    Mar 23, 2008 at 11:01 pm

    I heard that you can overwrite Vista’s Shutdow.exe with XP’s and then you should be able to increase the time to more than 10 min again.
    I haven’t tried it thou. havent had the time to get a hold of a XP machine, and since i am running x64 i assume that i need the file from XP x64 and not XP x86

  • Marcos

    Mar 29, 2008 at 10:04 pm

    I used this command in the same way as Vivian, and the 10 minutes limitation was disappointing. I know there are some programs that do the same, but I think is better to create a batch file with the following lines:
    TIMEOUT /T 3600 /NOBREAK
    SHUTDOWN /S

  • Dingdong

    Jun 22, 2008 at 6:04 pm

    For some reason shutdown /t doesnt work for me anymore. when i use it, it just goes to the recent shutdown list ex.

    Reasons on this computer:
    (E = Expected U = Unexpected P = planned, C = customer defined)

    Type Major Minor Title

    U 0 0 Other (Unplanned)
    E 0 0 Other (Unplanned)
    E P 0 0 Other (Planned)

    i tried with /t 50 and every other number. im trying to shutdown my own computer from my computer.

  • Mark

    Jun 25, 2008 at 10:12 am

    Hi all, you are not running shutdown.exe as administrator.

    In the accessoires folder of the start menu, right click command prompt and choose ‘run as administrator’.

    It’s still limited to 600 seconds. Bummer!

  • Dingdong

    Jun 29, 2008 at 6:46 pm

    Thanks for trying Mark but my UAC is off so i dont need to. thanks for trying though.

  • maniac

    Sep 5, 2008 at 12:52 pm

    i hav a network whith 4 systems 2 r having vista and 2 xp
    when xp says shutdown -i and gives the names of the computers our computers gets off
    but the vista users try all in vain nothing happens

    help plz

  • iamfrankenstein

    Sep 6, 2008 at 4:32 pm

    i use something like this:

    cmd /c timeout /t 3600 && shutdown /s /f /t 599

    in start run on vista. tis very nice, it can also be paste in a shortcut.

    greeting me

  • maniac

    Sep 7, 2008 at 5:13 pm

    thats not working i keep trying it all the time from various sites
    the one u gave me went on to keeping the whole screen filled with errors saying the invalid

  • seven

    Sep 18, 2008 at 2:25 am

    Your doing it wrong

    Shutdown -s -t 60

    That will work.

  • aaaa

    Sep 19, 2008 at 5:54 pm

    WHY MICROSOFT, WHY DID YOU LIMIT IT TO 10 MINUTES ON VISTA AND MAKE THE DIALOG LESS ACCURATE?

  • Jog

    Sep 22, 2008 at 7:06 am

    What about
    at 14:15 shutdown -s -t 15

  • Mark

    Sep 22, 2008 at 4:04 pm

    Jog – that’s not vista, that’s linux!

  • Jog

    Sep 23, 2008 at 11:56 am

    Do you think? :-) Check it out..

  • rik

    Sep 23, 2008 at 5:26 pm

    Thanks Jog that did the trick ;)

  • Mafa Decay

    Sep 30, 2008 at 4:30 pm

    I have home wireless network and I run XP Pro desktop PC logged in as an admin and there are a bunch of Vista home basic laptops on my wireless LAN. I got file and printer shares and broadband connection on LAN

    I type in shutdown -i and click browse and I get error the directory service is currently unavailable.

    I goto view workgroup in network and add comp as \\laptopname (which I substitute for real name) and continue the rest as normal.

    Nothing happes on Vista machines. Never tried adding my XP from vista though. Any ideas on the directory and or the not working lark? Pls

  • blakmagyk

    Oct 11, 2008 at 12:11 am

    hi, I’m trying to shutdown my friends computer from mine, i do shutdown -s -m \\SAM(friends comp name) -f and it says Access Denied I don’t know why…. Could someone tell me?

  • brend

    Oct 21, 2008 at 9:55 pm

    at 14:15 shutdown -s -t 15, yeah that works.
    look like they steal from linux!

  • Mark

    Oct 22, 2008 at 5:23 am

    Aha! A revelation! Thanks guys…. the solution has been easier than i thought :)

  • gmy

    Nov 11, 2008 at 6:39 pm

    blakmagyk:
    u have to login your friends computer as an administrator to execute a remote shutdown. if you know his administrator password try this before the shutdown command:

    net use \\SAM(friends computer name) /user:administrator (or your friends username)

    after you did it u can shut it down.

  • Can vista do this??? | keyongtech

    Jan 18, 2009 at 12:11 pm

    [...] Run it from Task Scheduler, say, at a certain time using whatever switches (here: http://itsvista.com/2007/03/shutdown/ ) you need. Or, you can try scheduled scripts/commands: [...]

  • Zoli

    Jan 22, 2009 at 5:50 pm

    If I use:
    shutdown /s /t 50
    that works, but
    shutdown /h /t 50
    does not work, only shows the usage help of shutdown? What is this???
    (while hibernate is switched on, so I can reach from start menu/shutdown)

  • no

    Mar 8, 2009 at 10:01 pm

    600 seconds….idiots. I’m reinstalling XP. Vista is a piece of shit

  • SHA

    May 6, 2009 at 12:47 pm

    thanks jog !

  • Lestat

    May 27, 2009 at 12:42 am

    Thanks Jog, I din’t know that command, Do you have more? or Where I can find more secrets commands?

  • . .

    Aug 11, 2009 at 7:29 pm

    for the shutdown command the “S” switch must be used before any others, ex. shutdown -t 99 -s does not work

  • Richard

    Aug 12, 2009 at 8:26 am

    I’ve just moved to Vista from XP. I like to put my system to sleep at certain times and I used to use the psshutdown utility, started by the task scheduler. I got the “access denied” problem so I thought I’d try the shutdown utility supplied by MS but there doesn’t seem to be a parameter for suspend. Any ideas please?

  • justarandomguy

    Dec 5, 2009 at 8:31 pm

    And if you want to stop the shutdown/restart/logout process simply type
    shutdown /a
    /a stands for “abort”
    ;)

Leave a Comment