title: PowerShell Clear-ADAccountExpiration not performing in the same way as the manual method
body: <p>I have issue when using PowerShell <code>Clear-ADAccountExpiration</code> to reset an account expiration date to <code>Never</code> in Active directory.</p>
  
  <p>Here's an account that is going to expire: </p>
  
  <pre><code>get-ADUser osbor_ri -properties * | select AccountExpirationDate,accountExpires | fl
  
  AccountExpirationDate : 31/12/2013 17:00:00
  accountExpires        : 130330692000000000
  </code></pre>
  
  <p>As you can see it will expire on the <code>31/12/2013 17:00:00</code>. 
  I want to clear this expiration and set it to <code>Never</code> expire; so I use the following <code>cmdlet</code>:</p>
  
  <pre><code>Clear-ADAccountExpiration osbor_ri 
  </code></pre>
  
  <p>This clears the <code>AccountExpirationDate</code> varible in AD but doesn't clear <code>accountExpires</code> to 0 instead it's set to <code>9223372036854775807</code> each time. </p>
  
  <pre><code>get-ADUser osbor_ri -properties * | select AccountExpirationDate,accountExpires | fl
  
  AccountExpirationDate : 
  accountExpires        : 9223372036854775807
  </code></pre>
  
  <hr>
  
  <p>But when I use the manual method in AD to set an account to never expire the <code>accountExpires</code> varible is set to <code>0</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/Z6wqP.png" alt="enter image description here"></p>
  
  <pre><code>get-ADUser osbor_ri -properties * | select AccountExpirationDate,accountExpires | fl
  
  AccountExpirationDate : 
  accountExpires        : 0
  </code></pre>
  
  <p>Why does the Powershell <code>Clear-ADAccountExpiration</code> not clear down <code>accountExpires</code> varible to <code>0</code> in the same way that the manual method does when setting an account to never expire? </p>
  
  <p>Also does leaving the <code>accountExpires = 9223372036854775807</code> mean the account will still expire as some point? </p>