Request for a WMI script

I am looking for a quick way to toggle my 2nd monitor, preferably using WMI, but anything will do. I want to simply run the app/script and have it enable or disable my 2nd monitor. This is because I often walk into my office, plug my Tablet PC into my 2nd monitor and enable the 2nd monitor to extend my desktop. Then when I run to meetings, I unplug the monitor and forget to disable the 2nd monitor support, so the desktop is still extended. Then when in meetings, many of my apps appear on the 2nd monitor, which no longer exists.

So, does anyone have a simple script to help me out? I will happily give you big kudos on my blog.