title: How to retrieve only enabled users from the Active Directory
body: <p>I'm trying to retrieve only enabled users in the AD. When I run this code line it returns the error. I tried using a filter as well to filter only enabled users for the requested info but it returns ALL users from every domain instead of just the single id.</p>
  
  <pre><code>Get-ADUser : A positional parameter cannot be found that accepts argument 'enabled -eq 'true''.
  </code></pre>
  
  <p>This is my code that is throwing the error.</p>
  
  <pre><code>Get-ADGroupMember -Identity 'Animal Shop A' | Get-ADUser -Filter '*' | Get-ADUser Where "enabled -eq 'true'" | Get-ADUser -Properties ('Mail')
  </code></pre>
  
  <p>This one returns ALL users from every domain</p>
  
  <pre><code>Get-ADGroupMember -Identity 'Animal Shop A' | Get-ADUser -Filter "enabled -eq'true'" | Get-ADUser -Properties ('Mail')
  </code></pre>
  
  <p>Is my syntax wrong on both of them? If I just want to return values from say "Animal shop A" and then "Animal Shop B"</p>