【发布时间】:2020-10-10 01:32:59
【问题描述】:
我们的服务器上有一个 powershell 脚本。试图弄清楚如何使用带有 -ComputerName 的 Invoke-Command 来远程运行它,但是当我运行时:
Invoke-Command - ComputerName XXXX -FilePath YYYY
看起来 Invoke-Command 正在寻找本地文件。如何指定我要远程运行仅在远程机器上可用的脚本?
【问题讨论】:
-
你的意思是它是否在网络共享上?如果是这样,请在 PSSession 时尝试 -Authenication Credssp。这允许双跳
标签: powershell