Automation

 View Only
  • 1.  Any possible way to get VMhost Info using C#

    Posted Nov 27, 2011 05:47 PM

    Hi all,


    Is there any C# way to get the GET-VMhost commad functionality..?

    Thanks



  • 2.  RE: Any possible way to get VMhost Info using C#

    Posted Nov 27, 2011 07:21 PM

    I'm not a C# programmer. But you should take a look at the VMware vSphere Web Services SDK. There are C# examples in the documentation.

    Regards, Robert



  • 3.  RE: Any possible way to get VMhost Info using C#

    Posted Nov 27, 2011 09:06 PM

    Hi welcome to vmware community .

    I think if you will move this discussion to vmware developer forums may get better output.

    Yours, Abbie



  • 4.  RE: Any possible way to get VMhost Info using C#

    Posted Nov 27, 2011 11:34 PM

    Hello, MattGeorgey-

    Like Robert said, the Web Services SDK samples should be helpful.  Another way you can get some C# .NET code for, well, most anything you can think of, really, is to use the VMware Project Onyx tool.  Onyx "generates code based on the mouse clicks you make in vSphere", and you can also connect your PowerCLI session to Onyx to get code based on the cmdlets you use.  The tool has several output modes, to include "C# .NET 2.0".

    LucD wrote about Onyx in his Taking the new Onyx 2.0 for a spin post, and a recent Communities thread at http://communities.vmware.com/message/1845793#1845793 talks about (among other things) some of the ways to use/connect to Onyx (vSphere client, PowerCLI session).