Problem executing psexec

喜欢而已 提交于 2019-12-25 03:44:13

问题


I am trying run below command

psexec \\remotemachine -u username -p password notepad

As per my understanding, above command should launch notepad on remotemachine, but it doesn't happen.

Strangely notepad.exe process gets created(I saw the tskmgr of remotemachine) every time i execute above command but notepad doesn't show up.

Am I missing anything in the command

By the way I am using 64 bit machines and both machines are on same domain


回答1:


Have you tried the -i switch?:

psexec \\\remotemachine -u username -p password -i notepad

The -i switch is described as follows:

Run the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.

The console session is what you would see on the physical screen attached to the machine. If you are using a Remote Desktop session and would like it to appear there, then first you need to determine the ID of the session in which you want the UI to appear, which you can see using Task Manager on the remote system (ID column of Users tab). Then you pass the ID after the '-i' switch as follows:

psexec \\\remotemachine -u username -p password -i 1 notepad

Omitting the session ID is the equivalent of specifying a session ID of 0.

Other switches are documented here: http://technet.microsoft.com/en-us/sysinternals/bb897553



来源:https://stackoverflow.com/questions/5258225/problem-executing-psexec

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