Thanks, this works.
I tried to read the code, but without any C# knowledge I wasn’t getting far.
To add detail, I tried to cheap by using the stored procedures to change the password, but the SP requires an encrypted password and I have no idea how to encrypt it.
If you do get this sorted please update this thread, that way I can add the extra arguments in.