I have written a few articles about VMware and the PowerShell command letâs and at the VMworld 2008 EUROPE in Cannes you can explore the PowerShell interfaces for VMware Infrastructure in the Automating VMware with PowerShell: Hands-On Lab. But the downside of PowerShell is that there isnât a nice user interface. Wouldnât it be great to use the PowerShell .net libraryâs and connect to your Virtual Centre server with Visual Basic Express 2008. It isnât documented but I have found a way to connect to VC using the following code :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim Config As New VMware.VimAutomation.Client20.VimClient
       Config.ConnectivityService.Login("https", "VC.NTPRO.LOCAL", "443", "Admin", "vmware")
       MsgBox(Config.ConnectivityService.IsConnected)
       MsgBox(Config.ConnectivityService.GetApiInfo.ApiVersion)
   End Sub
End Class
If everything goes well you will receive two message boxes, the first one will tell you âTrueâ? so youâre connected and the second one will display â2.5â?, this is the version of the API. The remainder of the code is up to you, please let me know if you can stop and start a VM. The beta version of the VI3 Windows Toolkit will be launched in March.