Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does "shutdown -y" do? [closed]

Tags:

cmd

shutdown

I tried some random parameters after the shutdown command in PowerShell 2.0 when I stumbled upon shutdown -y. All it seems to do is log out the user.
if any other random letter is used (that isn't a valid parameter) nothing happens. For example: shutdown -b

My question is: Does shutdown -y do anything special?

I could not find any documentation about this.

like image 430
Hulkerman Avatar asked Sep 06 '17 09:09

Hulkerman


1 Answers

The Windows 2000 documentation states the following:

/y: Use this switch to force a "yes" answer to all queries from the computer.

So it looks like by using -y or /y with no other switches you are doing the default behaviour of shutdown.exe, which is to logoff the user while also forcing any confirm prompts to be acknowledged with yes.

like image 107
Mark Wragg Avatar answered Oct 18 '22 15:10

Mark Wragg