加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用PowerShell来停止进程,我可以绕过确认吗?

发布时间:2020-12-13 20:09:27 所属栏目:Windows 来源:网络整理
导读:我是一个powerhell新手,但是当我调试一些代码时,我经常发现自己开始并停止一小部分服务.在Power shell中,我可以使用通配符轻松地停止进程,但是这样可以确认.有一个-confirm参数,但是我不能正确使用它? `Stop-Process -ProcessName alcore.* -Confirm` 我可
我是一个powerhell新手,但是当我调试一些代码时,我经常发现自己开始并停止一小部分服务.在Power shell中,我可以使用通配符轻松地停止进程,但是这样可以确认.有一个-confirm参数,但是我不能正确使用它?
`Stop-Process -ProcessName alcore.* -Confirm`

我可以绕过确认并停止进程吗?

感谢任何帮助,
?ck在圣地亚哥

尝试
stop-process -ProcessName alcore.* -Force

从get-help停止进程:

On Windows Vista and later versions of Windows,to stop a process that is not owned by the current user,you must start Windows PowerShell with the “Run as administrator” option. Also,you are prompted for confirmation unless you use the Force parameter.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读