title: Get groups from user list?
body: <p>I need to get groups for list of users. I can do that for users in TST1.txt list using below PS command:</p>
  
  <pre><code>Get-Content D:\TST1.txt | Get-ADPrincipalGroupMembership |
      select name | Out-File -Append D:\TST2.txt
  </code></pre>
  
  <p>But that list don't have user name and bit messy. below won't work either.</p>
  
  <pre><code>Get-Content D:\TST1.txt | Get-ADUser | select name |
      Get-ADPrincipalGroupMembership | select name |
      Out-File -Append D:\TST2.txt
  </code></pre>