Using PSEXEC returns no output from the remote task

旧时模样 提交于 2019-12-05 05:41:44

It turns out that (at least in this case) you need to use the fully qualified machine name when kicking off psexec. I haven't figured out why this is but it does the trick.

psexec.exe \\my-machine.mydomain.com ping localhost

and now all the output of the command is returned.

abhishek Singh

I already gave three variations for your problem kindly check this URL.

This will copy the iname.bat file in remote system and execute it and save the result in success.txt inside local machine directory in which we are running PSexec

PsExec.exe \remote_ip -u Administrator -p test@123 -c -f "iname.bat">success.txt

this will run test.bat present on remote machine and make Success.txt on remote machine

PsExec.exe \remote_ip -u Administrator -p test@123 -i cmd /C "C:\abhi\test.bat > C:\abhi\success.txt"

this will run test.bat present on remote machine and make Success.txt on localmachine

PsExec.exe \remote_ip -u Administrator -p test@123 cmd /C "C:\abhi\test.bat">success.txt

if you want to see output then remove redirection

PsExec.exe \remote_ip -u Administrator -p test@123 -c -f "iname.bat"

PsExec.exe \remote_ip -u Administrator -p test@123 -i cmd /C "C:\abhi\test.bat

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!