You try it without username and password parameter and see if it prompts you for one. if it does, it means it got the correct value from the DB for the vCenter part.
You then need to do the same for Username and Password.
$realvCenterIP = (Write-outPut $vCenterIP).vCenterIP
$realvCenterUser = (Write-outPut $vCenterUser).vCenterUser
$realvCenterPassword = (Write-outPut $vCenterPassword).vCenterPassword
Use that to do the Connect-Viserver
Connect-VIServer -Server $realvCenterIP -User $realvCenterUser -Password $realvCenterPassword