Hi I have Windows Server 2003 with CopSSH installed on it ( Cygwin + sshd ). W would like to be able to run a PowerShell script via SSH session command and then use it's output. Is there such capability ? How to do it ?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
Just invoke |
|||||||
|
|
First thing it is good to add PowerShell's executable path to user's PATH environmental variable. We do it by adding to user's .bashrc file line like:
Then we can run PowerShell script just typing in our SSH session
Of course now we can pipe it to use it's output. I just wonder why I have to press "Enter" two times in my SSH session after typing the command for it to work. |
|||||
|