powershell - 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
不能正确启动它。可能是什么问题?
解决方案
推荐阅读
- bash - 如何获得 bash 脚本的返回
- javascript - React 本机访问 reload 方法 dev-tools
- javascript - 萤火虫怎么了?有没有好的替代品?
- dialogflow-es - 是否可以在前端(Angular)中使用 dialogflow-nodejs-client-v2?
- java - 服务已经在运行,但它不应该在使用后台服务代码的位置
- mysql - 如何以最佳方式同时搜索文本和整数数据类型?
- python - Python asyncio (aiohttp, aiofiles)
- r - 为什么 as.matrix 在 R 中运行文本挖掘时会导致内存过载
- firebase - Firestore 提要/时间线建模
- node.js - 将猫鼬连接导出到我的 model.js 文件