Code: Select all
[string]$VBoxManage="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
$ini = $MyInvocation.MyCommand.Name.Replace(".ps1",".ini")
$ini = [IO.Path]::Combine($ScriptPath,$ini)
$vms = Get-Content -Path $ini
foreach($vm in $vms)
{
$arguments = 'startvm ' + '"' + $vm + '"' + ' --type headless'
start-process -NoNewWindow $VboxManage $arguments
}
For example, what would I do to the $argument variable below to show the GUI and hide/detach the GUI?
Code: Select all
foreach($vm in $vms)
{
$arguments = 'startvm ' + '"' + $vm + '"' + ' --type headless'
start-process -NoNewWindow $VboxManage $arguments
}