
powershell进程

Ever have one of those days where programs just aren’t cooperating? You try terminating a program, but it doesn’t respond? PowerShell can give you some extra fire power on those days.
曾经有一天不合作的程序吗? 您尝试终止程序,但是没有响应? 在那些日子里,PowerShell可以为您提供更多的火力。
如何在PowerShell中停止程序? (How Do I Stop A Program In PowerShell?)
1. The long command name stop-process can be shortened to kill.
1.可以缩短长命令名称的停止进程以使其终止。

2. If you know the numeric process that you’re wanting to stop, you can enter it. However, like most Window’s users, we know the name of the program we want to stop, so entering the name would be more convenient. The code below shows the next step (entering –processname to specify to PowerShell that it is going to stop a process with a name of what we want).
2.如果知道要停止的数字过程,则可以输入。 但是,像大多数Window用户一样,我们知道我们要停止的程序的名称,因此输入名称会更加方便。 下面的代码显示了下一步(输入–processname以向PowerShell指定它将停止一个名称为我们想要的进程)。
kill -processname
3. Next, we need to know the name of the process we want to stop. If we want to stop Chrome, for instance, we would enter:
3.接下来,我们需要知道我们要停止的进程的名称。 例如,如果要停止Chrome浏览器,请输入:
kill -processname chrome

If we hit enter (and Chrome was open), the program would end. Important note: some processes aren’t named what you think. You can locate the name of the processes by starting task manager and reviewing the processes.
如果我们按Enter键(Chrome已打开),程序将结束。 重要说明:某些过程未按您的想法命名。 您可以通过启动任务管理器并查看流程来找到流程的名称。

Notice that Google Chrome is listed as chrome, while the calculator is listed as calc. In order to stop the calculator we would type:
请注意,Chrome浏览器列为chrome,而计算器列为calc。 为了停止计算器,我们将输入:
kill -processname calc
4. If we want to stop multiple process such as Chrome, calculator and Excel, we would separate the processes by a comma:
4.如果我们要停止多个进程,例如Chrome,计算器和Excel,则可以用逗号分隔这些进程:
kill -processname chrome, calc, excel

The above command would kill Google Chrome, the calculator and Microsoft Excel.
上面的命令将杀死Google Chrome,计算器和Microsoft Excel。
powershell进程