title: Check memory type (ECC or not) by using PowerShell
body: <p>I am trying to check memory types on all PCs across company. My testing code is below <a href="https://stackoverflow.com/questions/14882767/how-to-retrieve-memory-type-rdimm-or-udimm">based on info from here</a>:</p>
  
  <pre><code>Get-WmiObject Win32_PhysicalMemory |
      Select-Object -Property PSComputerName, DeviceLocator, Manufacturer, PartNumber, @{label = "Size/GB" ; Expression = {$_.capacity / 1GB}}, Speed, datawidth, totalwidth, @{label = "ECC" ; Expression = {
          if ( $_.totalwidth &gt; $_.datawidth ) {
              "$($_.DeviceLocator) is ECC memory type"
          }
          else {
              "$($_.DeviceLocator) is non-ECC Memory Type"
          }
      }
  } | Out-GridView 
  </code></pre>
  
  <p>The results showing me that memory type is non-ecc:</p>
  
  <p><img src="https://i.stack.imgur.com/xnfUm.jpg" alt="enter image description here"></p>
  
  <p>But if I use 3rd party tool like "HWiNFO64 v4.30" the result is ECC memory. See pic below. How can I get the same memory info like pic below by using PowerShell? Speciously "Memory type" "Speed" and "ECC"</p>
  
  <p><img src="https://i.stack.imgur.com/sPAiK.jpg" alt="enter image description here"></p>