title: Get-ADUser -Properties not returning PasswordNeverExpires for all users
body: <p>I am trying to list all users that have the <code>PasswordNeverExpires</code> flag set.</p>
  
  <p>If I use</p>
  
  <pre><code>Get-ADUser
  </code></pre>
  
  <p>I get a list of all users in my domain, along with a load of default properties.</p>
  
  <p>If I use</p>
  
  <pre><code>Get-ADUser -Filter * -Properties Name | Format-Table -Property Name -AutoSize
  </code></pre>
  
  <p>I also get a list of all usernames in my domain, as a table.</p>
  
  <p>When I use</p>
  
  <pre><code>Get-ADUser -Filter * -Properties Name,PasswordNeverExpires | Format-Table -Property Name,PasswordNeverExpire
  </code></pre>
  
  <p>I get a table that contains a full list of usernames, but ONLY the following accounts have either <code>True</code> or <code>False</code> in the <code>PasswordNeverExpires</code> column</p>
  
  <pre><code>Guest
  krbtgt
  Administrator
  SBSMonAcct
  Network Administrator
  &lt;MyDomainAdminAccount&gt;
  SPSearch
  &lt;AnAdministratorAccountForOneOfOurSoftwareVendors&gt;
  &lt;AnAccountThatWasCopiedFromTheDomainAdministratorAccount&gt;
  &lt;AnotherAccountCopiedFromTheDomainAdministratorAccount&gt;
  </code></pre>
  
  <p>All the other items/usernames in the table have empty/blank/non-existent values.</p>
  
  <p>I have also tried</p>
  
  <pre><code>Get-ADUser -LDAPFilter "(&amp;(!userAccountControl:1.2.840.113556.1.4.803:=2)(userAccountControl:1.2.840.113556.1.4.803:=65536))"
  </code></pre>
  
  <p>but that only returns</p>
  
  <pre><code>&lt;MyDomainAdminAccount&gt;
  SPSearch
  </code></pre>
  
  <p>Why is the <code>PasswordNeverExpires</code> flag not being picked up for all users? Thanks.</p>