title: Powershell get a list of drives
body: <p>I'm using this command to get a list of my drives in my <code>Windows</code>:</p>
  
  <pre><code>get-wmiobject win32_volume | ? { $_.DriveType -eq 3 } | % { get-psdrive $_.DriveLetter[0] }
  </code></pre>
  
  <p>This gives:</p>
  
  <pre><code>Name           Used (GB)     Free (GB) Provider      Root
  ----           ---------     --------- --------      ----
  C                 131.85        333.62 FileSystem    C:\
  D                 111.15        200.63 FileSystem    D:\
  </code></pre>
  
  <p>What I actually want to get is the list of values under "Root" column.
  Basically a string as follows <code>C:\ D:\</code></p>
  
  <p>How can I do that?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I Managed to do this:</p>
  
  <pre><code>get-wmiobject win32_volume | ? { $_.DriveType -eq 3 } | % { get-psdrive $_.DriveLetter[0] } | Select Root
  </code></pre>
  
  <p>Which Gives:</p>
  
  <pre><code>   Root
     ----
     C:\
     D:\
  </code></pre>
  
  <p>How do I convert it to:</p>
  
  <pre><code> C:\ D:\
  </code></pre>