title: Get a list of enabled and not locked-out Active Directory Users in powershell
body: <p>I have below cmdlet:</p>
  
  <pre><code>  get-aduser -filter {Enabled -eq 'true' -and LockedOut -eq 'true'} -Properties samaccountname, givenname, sn, physicalDeliveryOfficeName | 
               Select-Object -Property samaccountname, givenname, sn, physicalDeliveryOfficeName |
               Export-Csv -Encoding Default -path $csvOutputPath -NoTypeInformation
  </code></pre>
  
  <p>Now I need to add a filter to exclude locked-out AD users in the above get-aduser cmdlet.... but I do not know how to do it....</p>
  
  <p>I know I can obtain locked-out users using below:</p>
  
  <p>Search-ADAccount -UsersOnly -Locked</p>
  
  <p>So any idea?</p>