To add: This is the event logs you will see at Windows 2012 R2 if the code was successful in changing the username password
you can filter it by this numbers in Windows Security event logs
search for: 4662,4723,4724,627,628,4771,4738
4662 - An operation was performed on an object
4723 - An attempt was made to change an account's password
4724 - An attempt was made to reset an accounts password
627 - Change Password Attempt
628 - User Account password set
4771 - Kerberos pre-authentication failed
4738 - A user account was changed
=========================================
Log Name: Security
Source: Microsoft Windows Security
Event ID: 4738
Keywords: Audit Success
============================================================
user account was changed.
Subject:
Security ID: devfsmendoza\useradmin
Account Name: useradmin
Account Domain: devfsmendoza
Logon ID: 0x65F62
Target Account:
Security ID: devfsmendoza\user1
Account Name: user1
Account Domain: devfsmendoza
Changed Attributes:
SAM Account Name: -
Display Name: -
User Principal Name: -
Home Directory: -
Home Drive: -
Script Path: -
Profile Path: -
User Workstations: -
Password Last Set: 24/2/2017 1:55:09 PM
Account Expires: -
Primary Group ID: -
AllowedToDelegateTo: -
Old UAC Value: -
New UAC Value: -
User Account Control: -
User Parameters: -
SID History: -
Logon Hours: -
Additional Information:
Privileges: -
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.