相关疑难解决方法(0)

PowerShell - 在远程计算机上执行脚本给出错误

以下内容对我不起作用 -

%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Noninteractive -command "& Invoke-Command -ComputerName "Spider_LT_86" -ScriptBlock { msiexec.exe /i "D:\3PDInstallers\ETLBackgroundWorkerSetup.msi" /qn /l*vx "D:\3PDInstallers\logs" }"
Run Code Online (Sandbox Code Playgroud)

我需要做的就是在远程机器上运行msiexec.我假设运行脚本的用户将具有对远程计算机的必需访问权限.

即使Computername指向本地计算机,该脚本也不起作用(并且使用相同的登录用户运行msiexec工作正常,因此它看起来不像权限问题) - 我确保WinRM服务正在运行,我也禁用防火墙检查是否是问题的原因,但到目前为止没有运气.我在这里错过了什么?

这是完整的错误,但它几乎列出了所有可能性 -

Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using
Kerberos authentication: The network path was not found.
Possible causes are:
  -The user name or password specified are invalid.
  -Kerberos is used when no authentication method and no user name are specified.
  -Kerberos …
Run Code Online (Sandbox Code Playgroud)

powershell powershell-remoting

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

powershell ×1

powershell-remoting ×1