I want to make a call to mintty.exe (OpenSSH/SFTP from CygWin) via Powershell.

How can be done most effectively ?

link|improve this question
Just use PuTTY's psftp.exe? – Daniel Beck Nov 29 '11 at 12:51
feedback

1 Answer

Invoke-Expression c:\cygwin\bin\mintty.exe

I made an assumption about the path of your executable.

Also, you should refer to the official documentation: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx

link|improve this answer
Thx.But what if I want to invoke a specific OpenSSH command via CygWin ? I also want to check the result of that call... A little context: I want to invoke from serverA via remote powershell a command on serverB having an OpenSSH SFTP command using CygWin.... – Patrick Peters Nov 28 '11 at 20:34
Ok well first of all don't call it "a dos command". It's not DOS. You should take a look at this. stackoverflow.com/questions/1673967/… – AaronJAnderson Nov 29 '11 at 0:29
Or spend a few minutes on google. There is a lot of information about how to do this. – AaronJAnderson Nov 29 '11 at 0:29
I called this: invoke-expression 'c:\cygwin\bin\mintty.exe -i -e df' to see if I get results from an interactive df statement, but I get no response, only empty string.... – Patrick Peters Nov 29 '11 at 12:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.