【发布时间】:2016-09-03 03:07:40
【问题描述】:
ps1 在远程机器上。我在其他机器的命令下运行。
使用下面的脚本有什么区别---
invoke-command -computer $MachineName -command { C:\hello.ps1 }
invoke-command -computer $MachineName -scriptblock{ C:\hello.ps1 }
另外,我将使用 for 循环用于具有相同脚本名称但仅位于每台远程机器上的不同工作序列的多台机器。想要了解第二台机器的执行只有在第一台机器完成时才会执行。对吗?
【问题讨论】:
标签: powershell powershell-4.0 powershell-remoting