VirtualBox – PowerShell Script to Start a Virtual Machine with the Maximum Number of Monitors

With the help of a Plugable UGA-2K-A, I sometimes attach an extra monitor to my PC.  I have a VirtualBox virtual machine that I like to run across all of my physical monitors, and I used to manually change the virtual machine’s Monitor Count when connecting or disconnecting the extra monitor.  I now have a PowerShell script which automatically detects the number of monitors connected to my PC, sets the Monitor Count of the virtual machine, and then starts the machine.  I am using the script on a Windows 8 host. I posted the script in this GitHub Gist.

Update: I found this blog entry, which has a similar script (although some of the mechanics are different).

Advertisements

One Response to VirtualBox – PowerShell Script to Start a Virtual Machine with the Maximum Number of Monitors

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: