Hello,
Thanks for reaching out. I would recommend using this method instead as its easier to use.
You can just pass in the password to the user settings and it will change the password for you.
I hope this helps.
Thanks,
Zach Sylvester
Software Developer
SmarterTools Inc.
www.smartertools.com