问题描述
当我偶然发现 shutdown -y
时,在PowerShell 2.0中的 shutdown
命令后尝试了一些随机参数。 似乎要做的只是注销用户。
如果使用了其他任意随机字母(不是有效参数),则不会发生任何事情。例如:关机-b
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
我的问题是:关机-y
有什么特别的事情吗?
My question is: Does shutdown -y
do anything special?
我找不到与此有关的任何文档。
I could not find any documentation about this.
推荐答案
指出以下内容:
就像使用 -y
或 / y
且不使用其他开关一样,您正在执行shutdown.exe的默认行为,即是注销用户,同时还迫使所有确认提示都用yes确认。
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.
这篇关于“ shutdown -y”到底是做什么的?做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!