Skip to content

Instantly share code, notes, and snippets.

@yutannihilation
Created August 19, 2014 15: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 yutannihilation/4c05c6759ed78c6ebd7f to your computer and use it in GitHub Desktop.
Save yutannihilation/4c05c6759ed78c6ebd7f to your computer and use it in GitHub Desktop.
$targetsfile_loc = "C:\Path\To\Script_Dir\vagrant.list"
$vagrant_cmd = "C:\HashiCorp\Vagrant\bin\vagrant.exe"
$putty_cmd = "C:\Path\To\putty.exe"
$current_loc = Get-Location
$targets = Get-Content $targetsfile_loc
ForEach ($target in $targets) {
$vagrant_dir,$putty_prof = $target.split(",")
Set-Location $vagrant_dir -PassThru
& $vagrant_cmd up
Start-Process $putty_cmd -ArgumentList ("-load", $putty_prof) -PassThru
}
Set-Location $current_loc -PassThru
C:\Path\To\vagrant1,putty_session1
C:\Path\To\vagrant2,putty_session2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment