Skip to content

Instantly share code, notes, and snippets.

@hebertcisco
Created April 4, 2022 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hebertcisco/e7df33bb835e48dac3c51398b9221e88 to your computer and use it in GitHub Desktop.
Save hebertcisco/e7df33bb835e48dac3c51398b9221e88 to your computer and use it in GitHub Desktop.
Start a list of docker containers with Powershell
#!/usr/bin/env pwsh
$Command = 'docker start'
$ContainerName = 'example', 'example2', 'example3'
foreach ($Container in $ContainerName) {
$Exec = $Command + ' ' + $Container
Invoke-Expression $Exec
}
Exit-PSSession
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment