Any value is missing also in syntax it will ask for password prompt
for example in below script
New-DbaDatabase -SqlInstance localhost -name newdbtocopy
when omit the '-name' it was prompting for some input/credentials, once I correct it the error disappeared