开发者

invoking commands on Unix from Windows power shell

Is this possible ?, someone has suggested 开发者_开发问答that I migth be able to do via ssh, essentially run a command on Unix pipe the output to a file get it back and then perform some action in the invoking Power Shell script.


Well, you can use tools like plink to execute a command via ssh on a remote server. Also you don't need to write the result to a file; you can simply assign it to a variable:

$output = plink ...


With Win32-OpenSSH you can execute commands over SSH. See Win32-OpenSSH Examples.


It is possible!
Have a look at this GitHub repository for all of the UNIX commands that have been compiled to run on Windows. Then, you can run both PowerShell and UNIX commands from PowerShell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜