Last active
October 23, 2022 07:15
-
-
Save krymtkts/47f70697cbe006e81d7fd801e1e3b351 to your computer and use it in GitHub Desktop.
Scripts for VirtualBox. I am not currently using it, but for those who need it.
This file contains 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
function Start-VBoxMachine() { | |
vboxmanage list vms | Select-Pocof -CaseSensitive | Out-String -Stream | Select-String -Pattern '\{(.+)\}' | ForEach-Object { vboxmanage startvm ($_.Matches[0].Groups['1'].Value) --type headless } | |
} | |
function Stop-VBoxMachine() { | |
vboxmanage list runningvms | Select-Pocof -CaseSensitive | Out-String -Stream | Select-String -Pattern '\{(.+)\}' | ForEach-Object { vboxmanage controlvm ($_.Matches[0].Groups['1'].Value) poweroff } | |
} | |
function Get-RunningVBoxMachines() { | |
vboxmanage list runningvms | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment