當我從管理命令提示字元執行以下命令:
psexec64 -i -u "nt authority\network service" C:\Windows\System32\cmd.exe
我收到這些錯誤訊息:
Couldn't install PSEXESVC service: The operation completed successfully. Error establishing communication with PsExec service on MYPC: The operation completed successfully.
我在 Windows 7 x64 SP1 上運行它。 PSEXESVC 服務已安裝並正在運作。當使用 32 位元版本時,我得到了相同的結果psexec
。
有什麼想法如何解決這個問題嗎?
答案1
作為解決方法,嘗試省略-i
(互動式)開關,使用新語法:
psexec64 -u "nt authority\network service" C:\Windows\System32\cmd.exe
根據PSExec對此開關的幫助:
運行該程序,以便它與遠端系統上指定會話的桌面進行互動。如果未指定會話,則進程在控制台會話中執行。
使用該-i
開關,您通常會在單獨的視窗中看到新的命令提示字元。如果沒有它,將不會出現單獨的窗口,但您仍然可以連接到在使用者帳戶上下文中執行的新 CMD.EXE 進程NT Authority\Network Service
。您可以透過WHOAMI
在提示下運行來驗證這一點。
答案2
首先,我會嘗試運行本地高程:
那對你有用嗎?
"c:\your_path\psexec.exe" -i -s cmd.exe
或者
"c:\your_path\psexec64.exe" -i -s cmd.exe
你應該得到類似的東西:
C:\Windows\system32>whoami /user
USER INFORMATION
----------------
User Name SID
=================== ========
nt authority\system S-1-5-XX
我在網域中的計算機上嘗試過:
C:\app\tools\Sysinternals Suite>psexec -i -u "nt authority\network service" C:\Windows\System32\cmd.exe
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
Couldn't install PSEXESVC service:
The network name cannot be found.
Make sure that the admin$ share is enabled.
C:\Windows\System32\cmd.exe exited on XXXX with error code -1073741510.
生產:
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>whoami /user
USER INFORMATION
----------------
User Name SID
============================ ========
nt authority\network service S-1-5-XX
我據此猜測該訊息Couldn't install PSEXESVC service:
已連接到您的網路名稱。
如果您嘗試這種方式,它對您有用嗎?
"\\computer.domain.com\C:\app\tools\Sysinternals Suite\psexec.exe" \\computer.domain.com -u "domain\username" -p "passwd" -e -s cmd.exe
答案3
在我最新的 64 位元 French W10 上,有效的是沒有空間的網路服務:
psexec -i -u "nt 權限\網路服務" cmd.exe
我希望我可以幫助你們中的一些人。