3 Replies Latest reply on Apr 17, 2019 8:58 AM by AbrahamYG

    Find my VM page from Multiple vCenter

    RajuVCP Hot Shot

      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.

        • 1. Re: Find my VM page from Multiple vCenter
          LucD Guru
          Community WarriorsvExpertUser Moderators

          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: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: Find my VM page from Multiple vCenter
            RajuVCP Hot Shot

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

            • 3. Re: Find my VM page from Multiple vCenter
              AbrahamYG Lurker

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