wish help you to fix your issue I am trying to execute shell script from power shell in windows machine. So starting wrote the shell script and invoked into the linux box by using below command: , first install the package
I hope this helps you . What most likely fails are the calls to the external programs, quser.exe and logoff.exe (likely the latter - I strongly suspect you need to run administrative privileges to log off other users' sessions). The stderr messages that external programs output show up in PowerShell's error stream, but they do not cause an exception, so your code runs and fails quietly.