如何使用命令提示符关闭Windows 10 PC

Microsoft Windows 10 Logo

Using the Command Prompt to turn off your Windows 10 PC provides more options and flexibility than merely using the shutdown option from the Start menu or pressing the power button on your PC. Here’s how it’s done.

使用命令提示符关闭Windows 10 PC可以提供更多的选项和灵活性,而不仅仅是使用“开始”菜单中的关闭选项或按PC上的电源按钮即可。 这是完成的过程。

使用命令提示符关闭PC (Shut Down Your PC Using the Command Prompt)

Start by pressing the Windows + R keys to open the Run window. From there, type “cmd” in the box and then select the “OK” button.

首先按Windows + R键打开“运行”窗口。 从那里,在框中输入“ cmd”,然后选择“确定”按钮。

Run window

This will open the Command Prompt. Here, type shutdown /s .

这将打开命令提示符。 在这里,输入shutdown /s

Type the shutdown command

Once you press Enter, a message will appear letting you know that Windows will shut down in less than a minute. You can select the “Close” button if you like, but this will not affect the shutdown process.

按下Enter键后,将出现一条消息,通知您Windows将在不到一分钟的时间内关闭。 您可以根据需要选择“关闭”按钮,但这不会影响关机过程。

Sign out message

That’s all there is to it. Within the minute, your PC will shut down. There’s also a way of restarting your PC using the Command Prompt if that’s what you prefer.

这里的所有都是它的。 在几分钟之内,您的电脑将关闭。 如果您愿意的话,还有一种使用命令提示符重启PC的方法。

使用命令提示符重新启动PC (Restart Your PC Using the Command Prompt)

This process for restarting your PC is nearly identical to shutting down your PC, except you’ll use a slightly different command in the Command Prompt.

重新启动PC的过程与关闭PC几乎相同,除了在命令提示符中使用略有不同的命令之外。

Open the Run window by pressing the Windows Key +R keys, type “cmd” in the box, and then select the “OK” button to open the Command Prompt.

通过按Windows键+ R键打开“运行”窗口,在框中键入“ cmd”,然后选择“确定”按钮以打开命令提示符。

Once in the Command Prompt, type shutdown /r .

在命令提示符中,键入shutdown /r

Restart command

Press the Enter key to proceed. Your PC will now begin the restart process within the next minute.

按Enter键继续。 您的PC现在将在下一分钟内开始重新启动过程。

These are just two of the many different options for shutting down your Windows PC from the Command Prompt. To get a full list of shut down options available to you, type shutdown /? in the Command Prompt and then press Enter. A complete list of switches and respective descriptions will be displayed.

这些只是从命令提示符关闭Windows PC的许多不同选项中的两个。 要获取可用的关闭选项的完整列表,请键入shutdown /? 在命令提示符下,然后按Enter。 将显示开关的完整列表和相应的说明。

list of shutdown options

For the convenience of our readers, we’ve provided the complete list of the shutdown commands and descriptions provided by Microsoft below.

为了方便读者,我们在下面提供了Microsoft提供的关机命令和说明的完整列表。

命令提示符关闭开关和参数列表 (List of Command Prompt Shutdown Switches and Parameters)

Switch and ParameterDescription
/?Display help.
/iDisplay the graphical user interface (GUI).
/lLog off. This cannot be used with /m or /d options.
/sShutdown the computer.
/sg

Shutdown the computer. On the next boot, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user.

After sign in, restart any registered applications.

/rFull shutdown and restart the computer.
/g

Full shutdown and restart the computer. After the system is rebooted, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user.

After sign in, restart any registered applications.

/a

Abort a system shutdown.

This can only be used during the time-out period.

Combine with /fw to clear any pending boots to the firmware.

/p

Turn off the local computer with no time-out or warning.

It can be used with /d and /f options.

/h

Hibernate the local computer.

It can be used with the /f option.

/hybrid

Performs a shutdown of the computer and prepares it for a fast startup.

Must be used with /s option.

/fwCombine with a shutdown option to cause the next boot to go to the firmware user interface.
/eDocument the reason for an unexpected shutdown of a computer.
/o

Go to the advanced boot options menu and restart the computer.

Must be used with /r option.

/m \\computerSpecify the target computer
/t xxx

Set the time-out period before shutdown to xxx seconds.

The valid range is 0-315360000 (10 years), with a default of 30. If the time-out period is greater than 0, the /f parameter is implied.

/c “comment”

Comment on the reason for the restart or shutdown.

A maximum of 512 characters allowed.

/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.

xx is the major reason number (positive integer less than 256).

yy is the minor reason number (positive integer less than 65536).

开关和参数描述
/? 显示帮助。
/一世 显示图形用户界面(GUI)。
/升 注销。 不能与/ m或/ d选项一起使用。
/秒 关闭计算机。
/ sg

关闭计算机。 在下次启动时,如果启用了“自动重新启动登录”,则自动登录并锁定最后一个交互式用户。

登录后,重新启动所有已注册的应用程序。

/ r 完全关闭并重新启动计算机。
/G

完全关闭并重新启动计算机。 重新引导系统后,如果启用了自动重新启动登录,则自动登录并锁定最后一个交互式用户。

登录后,重新启动所有已注册的应用程序。

/一种

中止系统关机。

这只能在超时期间使用。

与/ fw结合使用以清除所有挂起的固件启动。

/ p

关闭本地计算机,没有超时或警告。

它可以与/ d和/ f选项一起使用。

/H

Hibernate本地计算机。

可以与/ f选项一起使用。

/混合

关闭计算机并为快速启动做准备。

必须与/ s选项一起使用。

/ fw 与关闭选项结合使用可使下次启动进入固件用户界面。
/ e 记录意外关闭计算机的原因。
/ o

转到高级启动选项菜单,然后重新启动计算机。

必须与/ r选项一起使用。

/ m \\计算机 指定目标计算机
/ t xxx

将关机前的超时时间设置为xxx秒。

有效范围是0-315360000(10年),默认值为30。如果超时时间大于0,则隐含/ f参数。

/ c“评论”

评论重新启动或关闭的原因。

最多允许512个字符。

/F

强制关闭正在运行的应用程序而不会警告用户。

如果为/ t参数指定了大于0的值,则意味着/ f参数。

/ d [p | u] xx:yy

提供重新启动或关闭的原因。

p表示已计划重新启动或关闭。

u表示原因是用户定义的。

xx是主要原因数(小于256的正整数)。

yy是次要原因编号(小于65536的正整数)。

翻译自: https://www.howtogeek.com/512012/how-to-shut-down-your-windows-10-pc-using-command-prompt/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
关闭Windows 10的防火墙,有几种方法可以实现。 方法一:通过控制面板 1. 打开控制面板,在搜索栏中输入“Windows Defender 防火墙”并点击进入。 2. 在左侧导航栏中选择“启用或关闭Windows Defender 防火墙”。 3. 在弹出的窗口中,选择“关闭Windows Defender 防火墙(不推荐)”。 4. 点击“确定”保存更改。 方法二:通过设置应用 1. 打开“设置”应用,可以通过点击任务栏上的“开始”按钮,然后点击齿轮图标或者搜索栏中输入“设置”来找到它。 2. 在设置应用中,选择“更新和安全”选项。 3. 在左侧导航栏中选择“Windows Security”。 4. 在右侧窗口中,点击“防火墙和网络保护”。 5. 在下面的防火墙部分,点击“专用网络”和“公用网络”旁边的切换按钮,将它们都设置为“关闭”。 方法三:通过命令提示符 1. 打开命令提示符,可以通过点击任务栏上的“开始”按钮,然后在搜索栏中输入“命令提示符”并点击打开。 2. 在命令提示符窗口中,输入以下命令并按回车键:netsh advfirewall set allprofiles state off 3. 等待一段时间,直到出现“命令已成功完成”的提示。 无论您选择哪种方法,关闭Windows 10的防火墙后,请确保您的计算机已经安装了其他可靠的安全软件来保护您的设备免受恶意软件和网络威胁。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Win10系统如何关闭防火墙?](https://blog.csdn.net/xitongzhijia_abc/article/details/126353981)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [win10永久关闭防火墙命令windows11关掉防火墙win11关闭杀毒防火墙win10电脑防火墙怎么关闭](https://download.csdn.net/download/haodetaihaole/87238106)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值