title: How to get an object's property's value by property name?
body: <p>In PowerShell, how do you get an object's property value by specifying its name (a string)? I want something like the following:</p>
  
  <pre><code>$obj = get-something
  
  # View the object's members:
  $obj | gm
  
  # I could retrieve a property by doing so:
  write-host $obj.SomeProp
  
  # But for many purposes, I would really want to:
  write-host $obj | Get-PropertyByName "SomeProp"
  </code></pre>
  
  <p>Is there something similar to "Get-PropertyByName" in PowerShell?</p>