使用 PsExec sysinternal 工具启动 Notepad.exe [英] Launch Notepad.exe using PsExec sysinternal tool
问题描述
我正在尝试从本地服务器 B 在远程服务器 A 上启动 notepad.exe.
I am trying to launch notepad.exe on remote server A from local server B.
下面是运行良好的命令,我可以在任务管理器上看到 notepad.exe 进程,但是当我物理远程登录到服务器时,我没有看到记事本启动(GUI).
below is the command which works fine and I could see notepad.exe process on Task Manager however when I physically remote login to server I do not see notepad launched (GUI).
C:\Windows\System32>D:\SysInternals\psexec.exe \\serverB
-u Domain\user1 -p passXX -i -d notepad.exe
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
notepad.exe started on serverB with process ID 3328.
登录后如何看到记事本 GUI?
How would I see notepad GUI when logged in ?
推荐答案
serverB 是终端服务器吗?如果是这样,您必须指定用户的会话号,否则记事本将在控制台中打开(会话 0).您可以使用例如查询会话来获取服务器上的活动会话:查询会话/server:serverB user1
is serverB a terminal server ? if so you have to specify the user's session number, otherwise notepad will be opened in the console (session 0).
you can use for example query session to get the active session on you server :
query session /server:serverB user1
然后将会话号传递给 -i 参数:
then pass the session number to -i parameter :
psexec \\serverB -u domain\user1 -i 2 notepad.exe
其中 2 是 user1 的会话
where 2 is the session of user1
这篇关于使用 PsExec sysinternal 工具启动 Notepad.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!