8 Replies Latest reply on Aug 19, 2019 2:05 AM by LucD

    Export Esxi information

    orian Enthusiast

      Hello

       

      there is a script that can export the next Data from my Esxi Servers?

       

      • Cluster
      • Host
      • CPU Model
      • ID CPU
      • Cores per CPU
      • Esxi Total Memory
      • Current CPU power man policy
      • Esx Version
      • Boot Time Or Uptime
      • DNS Servers
      • NTP Servers
      • Bios Version
      • Bios Date

       

      thank you!!

        • 1. Re: Export Esxi information
          GaelV Enthusiast

          Hi,

           

          Most of the informations you need can be provided by the software RVTools (you can export in a .csv /excel file any informations)

           

          Here's the link

          https://www.robware.net/rvtools/download/

          1 person found this helpful
          • 2. Re: Export Esxi information
            orian Enthusiast

            Hello

             

            with rvtools the (,) is prevent me to import the data to sql servers and use it in reporting services.

             

            i prefer script instead

             

            thank you

            • 3. Re: Export Esxi information
              GaelV Enthusiast

              Hi,

               

              You can try this, the display is not very good but you got all the information :

              You have to write your cluster or * in the $esx line

               

              $esx = Get-Cluster "YourCluster or * " | Get-VMHost

              foreach ($esx in $esxHosts) {

                  $esx | Select Name,ProcessorType,NumCpu,MemoryTotalGB,Version,Build

                  $esx | Get-View | Select @{N="Uptime"; E={(Get-Date) - $_.Summary.Runtime.BootTime}}| fl

                  $esx | Select @{Name="NTPServers"; Expression = {($esx | Get-VMHostNTPServer)} } | fl

                  $esx | Get-VMHostNetwork | Select DnsAddress | fl

                  $esx | Get-VMHostHardware | Select BiosVersion | fl

              }

               

              It only misses   ID CPU and   Bios Date, i'm working on this..

              • 4. Re: Export Esxi information
                LucD Guru
                Community WarriorsvExpertUser Moderators

                Try something like this.
                Bios information depends on the HW vendor and the HW type, it is not avaialble for all HW.

                 

                Get-VMHost |

                Select Name, @{ N = 'Cluster'; E = { (Get-CLuster -VMHost $_).Name } },

                ProcessorType,

                  @{N = 'CoresPerCPU'; E = { $_.ExtensionData.Hardware.CpuInfo.NumCpuCores } },

                  MemoryTotalGB,

                  @{N = 'PowerPolicy'; E = { $_.ExtensionData.Config.PowerSystemInfo.CurrentPolicy.ShortName } },

                  Version,

                  @{N = 'BootTime'; E = { $_.ExtensionData.Summary.Runtime.BootTime } },

                  @{N = 'DNSServers'; E = { $_.ExtensionData.Config.Network.DnsConfig.Address -join '|' } },

                  @{N = 'NTPServers'; E = { $_.ExtensionData.Config.DateTimeInfo.NtpConfig.Server -join '|' } },

                  @{ N = 'BIOSVersion'; E = { $_.ExtensionData.Hardware.BiosInfo.BiosVersion } },

                  @{ N = 'BIOSDate'; E = { $_.ExtensionData.Hardware.BiosInfo.ReleaseDate } }

                Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                2 people found this helpful
                • 5. Re: Export Esxi information
                  orian Enthusiast

                  You have this info in uc4.

                  Moreover, these paramaters can be export easily with vmware orchestrator

                  Good luck!

                  • 6. Re: Export Esxi information
                    LucD Guru
                    Community WarriorsUser ModeratorsvExpert

                    Not sure what you mean by CPUId?
                    Is that the CPU Tag?
                    Perhaps show an example?

                    Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                    • 7. Re: Export Esxi information
                      orian Enthusiast

                      CPU count

                      • 8. Re: Export Esxi information
                        LucD Guru
                        User ModeratorsvExpertCommunity Warriors

                        If you mean the physical CPU packages, you can add this line

                         

                        @{ N = 'CpuPackages'; E = { $_.ExtensionData.Hardware.CpuInfo.NumCpuPackages } },

                         

                         

                        otherwise you can use the property NumCpu (which is packages X corespercpu)

                        Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                        1 person found this helpful