我是一个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.