当我使用运行脚本时,为什么 Alteryx 的 EmongoDump 在 PowerShell 中失败Invoke-Command
?
当我正常运行它时,我会收到以下成功消息:
命令行: "E:\Alteryx\bin\AlteryxService_MongoController.exe" MongoRoot="E:\Alteryx\bin\" DBName=AlteryxService DBRoot="E:\AlteryxServer\Service\Persistence\MongoDB" 端口=27100 IPV6=False DumpPath ="E:\Path" EMongoDump 正在运行..完成。
当我使用它运行它时Invoke-Command
:
命令行: "E:\Alteryx\bin\AlteryxService_MongoController.exe" MongoRoot="E:\Alteryx\bin\" DBName=AlteryxService DBRoot="E:\AlteryxServer\Service\Persistence\MongoDB" 端口=27100 IPV6=False DumpPath ="E:\Path" EMongoDump 失败:创建进程失败:访问被拒绝。
我是管理员,并且还使用以下方式启动了 RemoteRegistry 服务:
Get-Service remoteregistry -ComputerName $computer | Start-Service
$computer
执行脚本的服务器在哪里。
Invoke-Command
我正在使用:
Invoke-Command -ComputerName $computer "E:\Scripts\t1.ps1"
t1.sp1
包含:
net stop AlteryxService
$alteryx = "E:\Alteryx\bin\AlteryxService.exe"
& $alteryx emongodump=E:\Path
net start AlteryxService
我曾尝试使用-Scriptblock
. 它也显示相同的错误消息。
我也使用-Credential $username
了提示我输入密码的地方,但仍然出现同样的问题。
问题是什么以及如何解决?