Computer ‘…’ failed to join domain ‘…’ from its current workgroup ‘WORKGROUP’ with following error message: Unable to update the password. The value provided as the current password is incorrect.
If you can join the computer to a domain using the UI, but the PowerShell script fails with the error message above, make sure you add the name of the domain to the username that joins the computer to the domain.
When you use the UI, Windows knows the user belongs to the new domain. The configuration tools run as a local admin, so you need to specify the name of the domain with the user name.