title: Get Username from computer name using powershell and sccm
body: <p>I'm attempting to do the following :</p>
  
  <p>Query SCCM using Powershell for a computer name, then, within the output of that, get the UserName.</p>
  
  <p>Right now, I am using :</p>
  
  <p><code>Get-CMDevice -name &lt;computername&gt;</code></p>
  
  <p>This returns the entire record.  Within that is an item called "UserName".  That's what I want to extract out.</p>
  
  <p>It's been a very long time since working with powershell, let alone the SCCM plugins.</p>