Skip to content

Instantly share code, notes, and snippets.

@beckus
beckus / StartVMWithMaxMonitors.ps1
Created Dec 10, 2012
Starts a VirtualBox Virtual Machine with the maximum possible number of virtual monitors.
View StartVMWithMaxMonitors.ps1
# Starts the specified VirtualBox virtual machine with the maximum number
# of virtual monitors (i.e. with the number of virtual monitors matching the
# number of physical monitors attached to the PC).
# Set these variables as appropriate for your environment.
$virtualboxBinFolder = "C:\Program Files\Oracle\VirtualBox"
$VMName = "MyVirtualMachine"
# Returns the physical monitor count for this PC.
Function GetMonitorCount