Providing Login Credentials
When you provide login credentials in the command prompt or in a script file, a PowerShell limitation might prevent PowerCLI from processing non-alphanumeric characters correctly. To prevent login problems, escape the non-alphanumeric characters in your credentials.
To escape non-alphanumeric characters in PowerCLI, you need to place the expression that contains them in single quotes (').
Connecting to a vCenter Server System
This example illustrates how to escape non-alphanumeric characters when connecting to a selected vCenter
Server instance with the
Adminis!ra!or user name and the
Connect-VIServer -Server 10.23.112.235 -Protocol https -Username 'Adminis!ra!or' -Password 'pa$$word'