title: powershell to list multiple AD groups membership
body: <p>I have a list of AD groups in a text files adgroups.txt:</p>
  
  <p>Audit
  Internal_audit
  IT</p>
  
  <p>I want to be able to have a CSV list:</p>
  
  <p>Group Name             Users</p>
  
  <p>Nothing else.  My poweshell script I am using is:</p>
  
  <pre><code>$groups = Get-Content c:\temp\ADGroups.txt
  
  foreach($Group in $Groups) {            
  
  Get-ADGroupMember -Id $Group | select  @{Expression={$Group};Label="Group Name"},* | Export-CSV c:\temp\GroupsInfo.CSV -NoTypeInformation
  </code></pre>
  
  <p>This spits out WAY to much info.</p>
  
  <p>Group name   Distinguished name    Name     Object Class etc......</p>
  
  <p>Should I use a select-object and only select group name and name?                                                                  </p>