title: Powershell Get-Acl Owner Reference
body: <p>Is there a way to get the actual IdentityReference of the owner of a directory using PowerShell instead of the resolved string version?</p>
  
  <p>The problem is that I want to run a script from domain A to check/fix ownership issues for a file server in domain B.  We are in the middle of a migration so the sids from B have been added to the sidhistory of A.  So my code includes something like:</p>
  
  <pre><code>$acl = Get-Acl -Path $path
  $owner = $acl.Owner
  </code></pre>
  
  <p>When I run this from domain A, $owner = domain_a\user.<br>
  But when I run it from domain B, $owner = domain_b\user.</p>
  
  <p>It appears that the Get-Acl function is getting the IdentityReference, converting it to a string on the client, and then throwing away the raw data so I have no way of knowing who the actual owner is.</p>
  
  <p>It is possible to run this on a machine in domain B and get the correct results but this doesn't seem like it should be necessary.  Am I missing something?</p>
  
  <p>Thanks</p>