Typically, I use the following statement whenever i want to update a SQL service account
Get-DbaService sql1 -Type Engine -Instance MSSQLSERVER | Update-DbaServiceAccount -Username 'MyDomain\sqluser1'
Configures SQL Server engine service on the machine sql1 to run under MyDomain\sqluser1. Will request user to input the account password.
Here is a simple one liner to update SQL service account on multiple servers:
'SQLSERVER01','SQLSERVER02','SQLSERVER03'| Get-DbaService -Type Engine,Agent -Instance MSSQLSERVER | Update-DbaServiceAccount -Username 'MyDomain\sqluser1'
The type is inputs for both Engine and Agent. Therefore, both services will be set to run as that domain user.