C# code to access VMware vSphere PowerCLI [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
开发者_运维百科 Improve this questionAre there examples of C# code accessing vSphere API through PowerCLI or otherwise? For test automation, is PowerCLI script or C# code calling vSphere API the better choice? Please advise on docs and examples
Here are C# samples for the web services API: http://communities.vmware.com/community/developer/codecentral/vsphere_ws_c
And here is the programming guide for using C# with the .NET assemblies that come with PowerCLI: http://www.vmware.com/support/developer/windowstoolkit/wintk40/doc/viwin_devg.pdf
On a personal note, I prefer PowerCLI for doing my test automation. Lots of things can be accomplished with one line of PowerCLI, and you never have to open Visual Studio. ;)
精彩评论