2 Replies Latest reply on Jun 7, 2019 10:19 AM by Sobhim

    Export all Hosts and Clusters ESXis full folder path.

    Sobhim Lurker

      Hello Guys,

       

      I know I am a little bit late to the party, I am just learning PowerCLI and automating as much as I can. My need is to export hosts and clusters ESXIs full path like below:

       

      vCenter1    
            Datacenter1

                Europe/host1
                Africa/host1

                Africa/host2

                Aisa/host1

                America/host1
           Datacenter2
                Australia/host1

                New Zealand/host1

                New Zealand/host2

       

       

      So basically I need command to export to excel the output like:
      datacenter1/Europe/host1

      datacenter1/Africa/host1

      datacenter1/Africa/host2

      datacenter1/Aisa/host1

      datacenter1/America/host1

      datacenter2/Australia/host1

      datacenter2/New Zealand/host1

      datacenter2/New Zealand/host2

       

       

      I have been trying with Get-View and Get-VMHost but nothing seem to return what I am looking for.