Automation

 View Only
  • 1.  Find my VM page from Multiple vCenter

    Posted Apr 16, 2019 02:46 PM

    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.



  • 2.  RE: Find my VM page from Multiple vCenter

    Posted Apr 16, 2019 03:16 PM

    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



  • 3.  RE: Find my VM page from Multiple vCenter

    Posted Apr 16, 2019 03:25 PM

    Thanks LucD as always for your response. :smileyhappy:

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



  • 4.  RE: Find my VM page from Multiple vCenter

    Posted Apr 17, 2019 03:58 PM

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