following the advice from your own link...

dir >c:\file.txt 2>&1

psgetsid >c:\errors.txt 2>&1

This of course assumes that psgetsid properly outputs to STDOUT and STDERR.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.