views:

75

answers:

0

Hello all, When set up of remote PowerShell session is impossible for me I'm using the psexec tool for launching scripts remotely. I'm asking for correct exit code of psexec in loop. Syntax of psexec which I'm using is this: ./psexec.exe \$Hostname -u $Username -p $Password -i ("c:\something.bat") Is there any possibility to hide output in PowerShell console of psexec in each loop? I would like to see only the last success one. I tried Out-Null, calling with [void] or $null redirection, but it seems as this is cmd command this don't work.

related questions