我正在使用Microsoft Server 2008机器进行工作。不知何故,这台机器上的PowerShell无法运行“psexec”命令。
当我尝试运行它时,会出现以下情况:
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:\>
有什么想法吗?我需要这个命令,但我真的不想使用“变通方法”。