RajuVCP
Hot Shot
Hot Shot

Find my VM page from Multiple vCenter

Hi All,

i see script available to get VM inventory from multiple vCenters.

but do we have any script which can fetch VM inventory and display the details on webpage.

Like in webpage search column if i enter VM name , it should display VM's name, hostname, vCenter, Host hardware model, VM configuration.?

Thanks in Advance.

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
Tags (1)
0 Kudos
3 Replies
LucD
Leadership
Leadership

You mean something like this?

Get-VM |

Select-Object Name, @{N = 'VMHost'; E = { $_.VMHost.Name } },

@{N = 'vCenter'; E = { ([uri]$_.ExtensionData.Client.ServiceUrl).Host } },

@{N = 'VMHostHW'; E = { "$($_.VMHost.Manufacturer) $($_.VMHost.Model)" } } |

Out-GridView


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
RajuVCP
Hot Shot
Hot Shot

Thanks LucD as always for your response. Smiley Happy

These one gives response output in Grid view.

i was looking it to be in webpage. Like if i enter VM name and hit search , it should get the details and produce VM's configuration, Vms host name, vCenter name....

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
0 Kudos
AbrahamYG
Contributor
Contributor

That seems beyond the scope of Powercli on its own. Your best bet would be to get an export to csv, which can be opened and filtered via excel (or whatever spreadsheet editor you use) or have a web page digest it and format it to your wishes (perhaps through a Node backend or whatever).

0 Kudos