Skip to content

Instantly share code, notes, and snippets.

@uchagani
Created November 19, 2014 19:18
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 uchagani/79f356a2fb5fa76d4e39 to your computer and use it in GitHub Desktop.
Save uchagani/79f356a2fb5fa76d4e39 to your computer and use it in GitHub Desktop.
Vagrant Status In PowerShell
#Gets the vagrant status in returns it as a PowerShell Object
function Vagrant-Status
{
$output = vagrant status --machine-readable | Select-String -Pattern "state-human-short" -AllMatches
$output = $output | ? { $_ } | sort -uniq
$status = ConvertFrom-Csv $output -Header TimeStamp,Machine,StatusType,State
return $status
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment