无法使用 ^C 或 ^Z 终止 psexec 进程

dai*_*isy 5 windows command-line psexec

我无法终止通过 psexec 启动的远程进程,我已经尝试过^C^Z,但这并没有杀死该进程。

在此输入图像描述

除了关闭cmd窗口之外我还有什么选择?

Kel*_*ari 1

从另一个命令窗口或“运行”框中,您可以使用同样来自 Sysinternals 的 PSKill。它能够杀死远程进程。

Usage: pskill [-t] [\\computer [-u username [-p password]]] <process ID | name>
 -t    Kill the process and its descendants.
 -u    Specifies optional user name for login to
       remote computer.
 -p    Specifies optional password for user name. If you omit this
       you will be prompted to enter a hidden password.
Run Code Online (Sandbox Code Playgroud)

或者,您可以通过 RDP(或任何类似的方法)连接到远程计算机并从任务管理器终止该任务。

进程终止后,命令窗口应返回到提示符。