Powershell script while executing mysqldump script
I would guess that there's one or more characters in the password that are &quot;confusing&quot; the shell.
There are standard techniques for supplying passwords to mysql utilities that avoids having to have them coded into scripts or visible to any process list run on the machine.
See this answer.