title: Get the domain name of the user of ADSI object?
body: <p>In the following script, it will print all the users of the groups. However, the domain name is missing (Some users are in different Windows domain)?</p>
  
  <pre><code>$computer = [ADSI]"WinNT://$server,computer"
  
  $computer.psbase.children | ? { 
      $_.psbase.schemaClassName -eq 'group'
  } | % {
      $gn = $_.name.ToString()
      write-host $gn
  
      write-host "------"
      $group =[ADSI]$_.psbase.Path
      $group.psbase.Invoke("Members") | % {
          $_.GetType().InvokeMember("Name", 'GetProperty', $null, $_, $null)
      } 
  }
  </code></pre>