title: Powershell Filter value based on Select-String
body: <p>I am new to Powershell script
  I am using vmstat command and i am trying to filter values based on total memory and used memory.</p>
  <p>I have done this way but i am not able to just filter value.</p>
  <p>PS /home/ec2-user&gt; $usedmem = vmstat -s | Select-String 'used memory'</p>
  <p>PS /home/ec2-user&gt; $usedmem</p>
  <pre><code>   217976 K used memory
  </code></pre>
  <p>But my question is,</p>
  <p>how can i just get the value(217976) for used memory</p>
  <p>I really appreciate your help</p>