title: Does UserPrincipal.ChangePassword count toward password history?
body: <p><strong>Does a <a href="https://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.authenticableprincipal.setpassword(v=vs.110).aspx" rel="nofollow noreferrer">UserPrincipal.SetPassword()</a> contribute to a user's password history?</strong></p>
  
  <p><em>This is the administrative version of <a href="https://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.authenticableprincipal.changepassword(v=vs.110).aspx" rel="nofollow noreferrer">UserPrincipal.ChangePassword()</a>. SetPassword bypasses password rules (at some level) whereas ChangePassword is bound by the password complexity/length/history requirements.</em></p>
  
  <p>We have an application that allows users to reset their password via an application that basically does <code>SetPassword(tempRandomPassword)</code> followed by <code>ChangePassword(tempRandomPassword, newUserPassword)</code> using the newly entered password. This is to require the user to select a new password that adheres to our password standards of length/complexity/history.</p>
  
  <p>Say we have a password policy is that you can't use the previous X passwords. </p>
  
  <p><strong>With respect to the password history requirement, if after X SetPasswords, is the X+1th password valid now?</strong></p>