I want to scan and view information about ESX hosts which have "ESXi 5.0 Update 1" as their OS inside my asp.net web application. mainly to be able to retrieve the ESX specification and all the vms that are inside the ESX. where all the VMs are windows and unix based.
now currently we can do this using PowerCLI application, where I can view the ESX host info + all the VMs it contain directly inside the PowerCLI application. but I need to be able to read these info programmatically inside my asp.net web application, and store them inside our own database. now seems there are two main approaches that allow me to scan ESX hosts from my asp.net :-
- Using asp.net WMI.
OR
- Integrating with the PowerCLI, either using any available API (not sure if powercli provides any API) OR by directly executing powerCLI scripts from my asp.net web application..
so can anyone advice which approach is preferred ? and are there specific prons/cons or limitation for each approach ?
I am trying to do these 2 main functions:-
- the ability to scan ESX using IP or name.
- after the scan is completed to be able to programmatically read the ESX info and the VM names it contain...
Thanks in advance for any help.