title: Retrieve specific drive data - Get-WmiObject Win32_logicaldisk
body: <p>I am attempting to retrieve the FreeSpace for a specific drive using Get-WmiObject.</p>
  
  <p>Using Get-WmiObject Win32_logicaldisk on my machine returns the following:</p>
  
  <pre><code>PS C:\Users\Julian\Desktop\Tools\Powershell&gt; Get-WmiObject Win32_logicaldisk | Select-Object DeviceID, FreeSpace
  DeviceID  FreeSpace
  --------  ---------
  C:  47114498048
  S:  9963356160
  Z:  985061974016
  </code></pre>
  
  <p>I want to specifically request the FreeSpace dependent on the drive letter (DeviceID) I specify however I'm unsure how to do so as I'm rather new to powershell. Any help would be appreciated.</p>