我在一台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:\>它运行的是powershell 2.0。我通过这样做发现了这一点:
PS C:\> $Host.Version
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
PS C:\>有什么想法吗?我需要这个命令,而且我真的不喜欢使用“变通办法”。
发布于 2012-05-20 09:01:14
完成答案:
您必须从下面的链接下载PSEXEC,并将从Powershell或任何命令提示符启动的路径保存在路径中:http://technet.microsoft.com/en-us/sysinternals/bb897553
https://stackoverflow.com/questions/10652000
复制相似问题