Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How can be done most effectively ?

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

1 Answer 1

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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