title: Get property for Get-Counter commandlet
body: <p>I was exploring PowerShell to get sample of CPU utilization for couple of servers.
  I am using <code>Get-Counter</code> command-let for this purpose.
  I need value of CPU utilization or in other words cooked value for  counter <code>"\Processor(_Total)\% Processor Time"</code> for certain sample and interval.
  I use commandlet something like </p>
  
  <pre><code>$temp_array=Get-Counter  -ComputerName server1  -Counter "\Processor(_Total)\% Processor Time" -MaxSamples 2 -SampleInterval 1
  $temp_array[0].countersamples|Select-Object -Property CookedValue
  </code></pre>
  
  <p>and output is like </p>
  
  <pre><code>CookedValue
  -----------
  2.90508736147317
  </code></pre>
  
  <p>I just need the value. If I use </p>
  
  <pre><code>$array_temp=Get-Counter  -ComputerName pwisdevsql10  -Counter "\Processor(_Total)\% Processor Time" -MaxSamples 2 -SampleInterval 1  
  [String]$var=$array_temp[0].countersamples|Select-Object -Property CookedValue 
  echo $var
  </code></pre>
  
  <p>It gives output </p>
  
  <pre><code>@{CookedValue=12.6116279752759}
  </code></pre>
  
  <p>Type Cast to double does not work.
  How can I extract the value "12.6116279752759" only.</p>