psexec不被承认

use*_*342 5 powershell psexec

我正在使用Microsoft Server 2008计算机.出于某种原因,命令"psexec"在这台1台机器上的PowerShell中无效.

当我尝试运行它时,我得到了这个:

PS C:\> psexec
The term 'psexec' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:7
+ psexec <<<<
    + CategoryInfo          : ObjectNotFound: (psexec:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\>
Run Code Online (Sandbox Code Playgroud)

它正在运行powershell 2.0.我发现这一点:

PS C:\> $Host.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1


PS C:\>
Run Code Online (Sandbox Code Playgroud)

有什么想法吗?我需要这个命令,我真的不想使用"解决方法".

Avk*_*han 8

完成答案:

你必须需要从下面的链接下载PSEXEC并保持路径从PowerShell中的启动或任何命令提示符: http://technet.microsoft.com/en-us/sysinternals/bb897553