Created
April 4, 2022 19:21
-
-
Save hebertcisco/e7df33bb835e48dac3c51398b9221e88 to your computer and use it in GitHub Desktop.
Start a list of docker containers with Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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