psexec not recognized

user952342 picture user952342 · May 18, 2012 · Viewed 42.7k times · Source

I am working on a Microsoft Server 2008 machine. For some reason, the command "psexec" is not working from powershell on this 1 machine.

When I try to run it I get this:

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:\>

It is running powershell 2.0. I found this out by doing:

PS C:\> $Host.Version

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


PS C:\>

Any thoughts? I need this command and I'd really prefer not to use a "work around".

Answer

AvkashChauhan picture AvkashChauhan · May 20, 2012

Completing the Answer:

You must need to download PSEXEC from the link below and keep in path the launch from Powershell or any Command prompt: http://technet.microsoft.com/en-us/sysinternals/bb897553