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.
You mean something like this?
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
Thanks LucD as always for your response.
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....
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).