1 Reply Latest reply on Apr 12, 2011 11:29 AM by LucD

    Healthcheck Script Help

    steve31783 Hot Shot

      I would like to modify this existing Healthcheck Script...

      http://communities.vmware.com/docs/DOC-7430

       

      I like it almost exactly as it is, but I would like to modify the "ESX Hardware configuration" section to also include the server name (and maybe even the ESX version and build if possible) to include that info. for each line (that way I have an easy inventory of server name to hardware type, which this report does not do).

       

      Can anyone help?

       

       

      Also - Are there any other recommendations for SIMPLE powershell based healthcheck scripts?

        • 1. Re: Healthcheck Script Help
          LucD Guru
          User ModeratorsCommunity WarriorsvExpert

          Replace this

           

          #######################
          # VMware ESX hardware #
          #######################
          Get-VMHost | Get-View | ForEach-Object { $_.Summary.Hardware } | Select-object Vendor, Model, MemorySize, CpuModel, CpuMhz, NumCpuPkgs, NumCpuCores, NumCpuThreads, NumNics, NumHBAs | ConvertTo-Html –title "VMware ESX server Hardware configuration" –body "<H2>VMware ESX server Hardware configuration.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

           

          by this

           

          #######################
          # VMware ESX hardware #
          #######################
          Get-VMHost | Get-View | ForEach-Object {$esx = $_; $_.Summary.Hardware } | Select-object @{N="Name";E={$esx.Name}},@{N="ESX version";E={$esx.Config.Product.Version}},Vendor, Model, MemorySize, CpuModel, CpuMhz, NumCpuPkgs, NumCpuCores, NumCpuThreads, NumNics, NumHBAs | ConvertTo-Html –title "VMware ESX server Hardware configuration" –body "<H2>VMware ESX server Hardware configuration.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation