It appears ps.exe is not found on all builds.
You could make one yourself, if you are comfortable with C++, using the following:
http://msdn.microsoft.com/en-us/library/aa446560.aspxThis article is for making a GUI application, but the functions could be used for what you need. You could then call the created exe with a batch file.