The SDK is the preferred mechanism for programmatically interacting with VI3 is the SDK, a powerful tool that can be harnessed with another equally powerful tool, .NET. In this tip, I will describe the beginning steps you can take on your path to leveraging the VI3 SDK with .NET using C#.
This article is the third in a series designed to help developers understand how to leverage the VI3 SDK with .NET and C#. If you haven't already, it would be best to go back and read part one and part two before you proceed
We will begin right where we left off by expanding on the hostshow program. This new program, pgadd, will allow users to add port groups to existing VLANs on multiple ESX servers. I wrote this program about two months ago; and now, I know it was a great idea because another program was just released that does the same thing. Thanks to the guys at Run-Virtual for this awesome GUI app; it will be a mainstay in every VI3 administrator's arsenal. And those admins that prefer the command-line can still write their own app to the tune of the framework I provide in this article.
The source code for pgadd starts to differ from the hostshow code at line 300 where we previously set the property specif...
To continue reading for free, register below or login
To read more you must become a member of SearchVMware.com
');
// -->

ication object to collect the name property of the HostSystem object. For this program, we need to tell the property specification object to also collect the "config" and "configManager" properties.
You can download the complete source code for pgadd at my Website. Between hostshow and pgadd, I hope that I have shown you how easy it is to use the .NET framework in combination with C# to create some fantastically simple and yet powerful applications that you can use to interface with your VI3 systems.
This is the last part in my series on how to leverage the VI3 SDK with .NET and C#. If you have any questions about the VI3 SDK, .NET or C# please feel free to e-mail me at akutz@lostcreations.com. And be sure to check out the vish2 project, which is filled with examples that expand on what we have covered in this series.
Andrew Kutz is deeply embedded in the dark, dangerous world of virtualization. Andrew is an avid fan of .NET, open source, Terminal Services, coding and comics. He is a Microsoft Certified Solutions Developer (MCSD), a SANS/GIAC Certified Windows Security Administrator (GCWN) and a VMware Certified Professional (VCP) in VI3. Andrew graduated from the University of Texas at Austin with a BA in Ancient History and Classical Civilization and currently lives in Austin with his wife Mandy and their two puppies, Lucy and CJ.