Skip to content

Instantly share code, notes, and snippets.

@beckus
beckus / StartVMWithMaxMonitors.ps1
Created December 10, 2012 02:26
Starts a VirtualBox Virtual Machine with the maximum possible number of virtual monitors.
# 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