首页 > 解决方案 > PsExec 远程脚本启动

问题描述

我有一个文件,我在系统帐户下使用这个命令(路径是虚拟的)开始。我开始psexec -is cmd然后启动它:

powershell -ExecutionPolicy Bypass -Noninteractive -File "\\share\file.ps1" -Config "\\share\Config.xml" -Webservice "http://script/endpoint"

它给了我完成的每个步骤的输出。我想system account在远程机器上远程启动此命令psexec \\computername -s cmd,但脚本失败(原因未知)。

如果我在powershell -ExecutionPolicy Bypass -Noninteractive -File "\\share\file.ps1" -Config "\\share\Config.xml" -Webservice "http://script/endpoint"本地启动它可以工作并给我输出。

我在互联网上阅读,无法弄清楚为什么psexec \\computername -s cmd不能正确启动它。可能是什么问题?

标签: powershellremote-accesspsexec

解决方案


推荐阅读