title: Active Directory password expiration in powershell
body: <p>When I retrieve the password expiration, it shows a date 6 months after they changed their password, when it is actually set to 3 months. Is there a way to see this updated date? Or where is it being set at that I can pull that date in?</p>
  
  <p>I currently am using this to output:</p>
  
  <pre><code>Get-ADUser -identity $ntaccount
  @{ Name = "Expiration Date"; Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}
  </code></pre>