Skip to content

Instantly share code, notes, and snippets.

@aytch
Created October 24, 2015 16:49
Show Gist options
  • Select an option

  • Save aytch/427dcf459c54f602faf0 to your computer and use it in GitHub Desktop.

Select an option

Save aytch/427dcf459c54f602faf0 to your computer and use it in GitHub Desktop.
$serverlist = "server1","server2"
foreach ($s in $serverlist) {
Invoke-Command -ComputerName $s -AsJob -ScriptBlock { chef-client --once }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment