Remove the UserName and Password parameters from the script parameter list. Since you're using Get-Credential now to ask the user for credentials this is not necessary.