访问 VMware vSphere PowerCLI 的 C# 代码 [英] C# code to access VMware vSphere PowerCLI

查看:30
本文介绍了访问 VMware vSphere PowerCLI 的 C# 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有 C# 代码通过 PowerCLI 或其他方式访问 vSphere API 的示例?对于测试自动化,调用 vSphere API 的 PowerCLI 脚本或 C# 代码是更好的选择吗?请提供有关文档和示例的建议

Are 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

推荐答案

以下是 Web 服务 API 的 C# 示例:http://communities.vmware.com/community/developer/codecentral/vsphere_ws_c

Here are C# samples for the web services API: http://communities.vmware.com/community/developer/codecentral/vsphere_ws_c

这里是使用 C# 和 PowerCLI 附带的 .NET 程序集的编程指南:http://www.vmware.com/support/developer/windowstoolkit/wintk40/doc/viwin_devg.pdf

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

就我个人而言,我更喜欢 PowerCLI 来执行我的测试自动化.使用一行 PowerCLI 就可以完成很多事情,而且您永远不必打开 Visual Studio.;)

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. ;)

这篇关于访问 VMware vSphere PowerCLI 的 C# 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆