title: Filter Get-ADPrincipalGroupMembership
body: <pre><code>Get-ADPrincipalGroupMembership -Identity $ntaccount1 | select Name | Sort Name
  </code></pre>
  
  <p>The above command displays the Names of all the AD groups an active directory account is in. I tried to add <code>-Filter</code> to the end but it does not work. How can I filter out the results to only display things that contain a certain string?</p>
  
  <p>Edit: I tried one solution posted below but I want the output to be just the AD group without any titles or heading. It currently looks like this:</p>
  
  <pre><code>Name
  -----
  group_here
  </code></pre>