title: Format HTML lost Drives
body: <p>I am working on a script to receive disk space alerts. Basically I calculate the units that are below 10% of space and I create an .html with the name of the server and the calculation of 10%.</p>
  <pre><code>Param([string]$ComputerName = &quot;&quot;)
  
  $disks = Get-CimInstance -ClassName Win32_LogicalDisk -ComputerName $ComputerName -Filter &quot;DriveType = 3 and DeviceID != 'C:'&quot; | Where-Object {($.freespace/$.size) -le '0.1'} foreach ($disk in $disks) {
  
  [PSCustomObject]@{
      Server = $ComputerName
      Drive = $disk.Caption
      AmpliarGB = [System.Math]::Round(($disk.Size / 1GB) * (10 /100) - ($disk.FreeSpace / 1GB) +40)
    
      } | ConvertTo-Html -Head $Header | Out-File  &quot;C:\temp\test.html&quot;
      } 
  </code></pre>
  <p>The server has 8 drives but when I run the script it only shows me one.</p>