【发布时间】:2018-07-31 18:43:50
【问题描述】:
我正在编写一个脚本,该脚本具有多个需要时间在不同远程计算机上执行的功能。有什么方法可以同时以并行方式调用命令它们吗?一个例子将不胜感激。谢谢
【问题讨论】:
-
您看过 PowerShell 工作流吗? Here's Ed Wilson's (The Scripting Guy) take on them,这里是Microsoft's overview。
-
Invoke-Command -ComputerName $all-my-computers -ScriptBlock { #code }-> 可能与Run powershell commands in parallel重复