经过多次尝试去理解后,我问道:P 开关是否只在接下来的组合中有效,而仅此而已?
我想我理解微软的页面,但他们发明这个仅用于关机的开关似乎很奇怪。
Shutdown /P
Shutdown /P /F
答案1
Shutdown /?
在我的 Windows 11 上是这样说的:
/p Turn off the local computer with no time-out or warning.
Can be used with /d and /f options.
因此它可以与以下组合:
/f Force running applications to close without forewarning users.
The /f parameter is implied when a value greater than 0 is
specified for the /t parameter.
/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).
我认为它也可以与与关闭过程本身无关的其他标志一起使用,例如:
/e Document the reason for an unexpected shutdown of a computer.
/m \\computer Specify the target computer.