Currently I have these cmdlets
and an object type VirtualBoxVM which currently has the fields Name, Uuid, State, Running (bool, not shown by default) and Info (everything returned by VBoxManage showvminfo as a string, not shown by default).PS C:\Program Files\WindowsPowerShell\Modules\VirtualBox> Get-Command -Module VirtualBox CommandType Name Version Source ----------- ---- ------- ------ Function Get-VirtualBoxVM 0.0 VirtualBox Function Invoke-VirtualBoxVMPowerShellScript 0.0 VirtualBox Function Invoke-VirtualBoxVMProcess 0.0 VirtualBox Function New-VirtualBoxVMObject 0.0 VirtualBox Function Open-VirtualBoxVMConsole 0.0 VirtualBox Function Start-VirtualBoxVM 0.0 VirtualBox Function Stop-VirtualBoxVM 0.0 VirtualBox
- Invoke-*Process runs a program on the VM using a credential if given or asking for the password of the current user if none given.
- Invoke-*PowerShellScript runs a PowerShell script block (for example Install-WindowsUpdate -Confirm:0 -AutoReboot, I like updating VMs semi-manually).
- Open-*Console starts a VM and opens the GUI. Start-*VM starts the VM in the background. Each cmdlet takes one Name, Uuid or VirtualBoxVM except Get-*VM which can use wildcards to find VMs.
- New-*Object does not create a VM but creates a VirtualBoxVM object based on the output of VBoxManage showvminfo. It is used internally by Get-VirtualBoxVM.