PsExec Throws Error Messages, but works without any problems

This is because PowerShell sometimes reports a NativeCommandError when a process writes to STDERR. PsExec writes the infoline

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

to STDERR which means it can cause this.

For more information, see these questions / answers:

Leave a Comment