4 Replies Latest reply on Nov 12, 2019 2:58 PM by bansne

    Get /tmp details for all esxi

    bansne Enthusiast



      I found out this thread Free INODES and % free RAMDISK  with exactly what I was looking for.

      However, I want export that will list details of only ESXi with more than 50% memory been used under /tmp directory. eq to 100 or maybe greater than 50%.



      foreach($esxi in (Get-VMHost)){

          $esxcli = Get-EsxCli -vmhost $esxi

          $details +=(

              $esxcli.system.visorfs.get() |

               if ($details | where {$_.'Ramdisk Name' -eq "tmp"}) -eq 100){ write-output $esxi.name}