PowerShell v2 CTP3 makes it pretty easy to connect to a web service. VMware Lab Manager has a really good web service interface, so even though there are no Lab Manager cmdlets it’s still pretty easy to use PowerShell to automate Lab Manager.

First, you’ll need some library code that defines a few helper functions to get you started. I’ve posted this over at PoshCode. Download that and save it to a file called LabManager.ps1

Next, start a PowerShell session in the same directory as LabManager.ps1. The code below shows how to use this to connect to and automate Lab Manager.

The complete reference to the Lab Manager API is also online.

Here’s a video showing it in action.

 Managing VMware Lab Manager with PowerShell CTP3

A nice new resource for the VI Toolkit:

In addition to being available on poshcode, I’m going to start putting all my demos on my Skydrive folder for easy access. If you ever need some ideas or a quick demo to convince your coworkers they should be using the VI Toolkit, it’s a great place to look. If you’re interested, add it to your RSS reader and stay tuned for some great updates.