Okay, now as I tried your code, I think your WFA command passed but it didn't do what you wanted it to. Correct?
Why this happened?
This is common mistake people make with powershell cmdlets like Invoke-NcSsh or Invoke-Command basically cmdlets that connect remotely on another system and excute another command there. Using -ErrorAction stop is NOT going to fail, the action provided erroraction is the erroraction for the Invoke-Ncssh and not the command you passed into for execution. So any error that happens in the passed command is NOT going to be thrown as an error by Invoke-NcSsh. Hence the execution continues without any visible problems.
Use the below code. It perhaps is not going to make work, but it will give you the error why the firmware upgrade is failing. The WFA command will not sliently finish as before.
Good to know you got it working. WFA doesn't have any issues with whatever passwords your Ontap account has including all special characters.
Now about the solution design, I see that you are not taking the full advantage of WFA and the features it brings. You are getting the list of CLuster Nodes in command code and running firmware upgrades on each of them.
While this in most simple form works, I can suggest you better design with faster execution, better job tracking, higher flexibility in nodes selection, and better error handling.
It will help you in your future WFA workflow creations.
Give me some time, I'll make a dar file and then explain you.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.