9 Replies Latest reply on Jan 4, 2020 9:46 AM by vmk2014

    get Datastore Overprovisioned%  in percentage

    vespavbb Enthusiast



      I try to generate a report where I can see the overprovisioned in percentage. but the math does not work. Can someone help me out here?



      $dsrz1 = get-datastore | where-object {$_.name -match “RZ1_”} | get-view

      $dsrz1rreport = @()

      foreach($ds1 in $dsrz1){


        $ds1 = $dsrz1 | select -expandproperty summary | select name,

      @{N=”Capacity (GB)”; E={[math]::round($_.Capacity/1GB,2)}},

      @{N=”FreeSpace (GB)”;E={[math]::round($_.FreeSpace/1GB,2)}},



      @{N=”Provisioned (GB)”; E={[math]::round(($_.Capacity – $_.FreeSpace + $_.Uncommitted)/1GB,2) }}| sort -Property Name


          $dsrz1rreport += $ds1