通过psexec,如何将cmd结果输出到远程机器上的文件?例如echo hello>文件

时间:2017-10-19 14:46:01

标签: cmd psexec

以下命令写了“你好'到txt文件:

echo hello >c:\output.txt

在使用psexec时,如何将其作为远程命令进行调整?以下内容的行为方式不同:

PsExec.exe -nobanner -accepteula \\IP -u username -p password -n 30 -h -i 1 cmd /c echo hello >c:\output.txt

c:\ output.txt未在远程计算机上创建

1 个答案:

答案 0 :(得分:0)

PsExec.exe -nobanner -accepteula \ IP -u username -p password -n 30 -h -i 1 cmd / c“echo hello> c:\ output.txt”

相关问题