Here's the output....
Below are the results of hitting cancel at the prompt. NOTE I do not have a password for it.
PS C:\Windows\system32> Connect-VIServer <MyvCenterServer> -Verbose
VERBOSE: Attempting to connect using SSPI
VERBOSE: Could not establish trust relationship for the SSL/TLS secure channel with authority '<MyvCenterServer>'.
VERBOSE: Connect using SSPI was unsuccessful
Connect-VIServer : 2/15/2019 10:05:12 AM Connect-VIServer Could not determine user name and/or password for server<MyvCenterServer>
At line:1 char:1
+ Connect-VIServer <MyvCenterServer> -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-VIServer], ViServerConnectionException
+ FullyQualifiedErrorId : ViCore_Login_CredentialNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
Below are the results of typing in a random set of credentials with the expectation it will fail....
PS C:\Windows\system32> Connect-VIServer <MyvCenterServer> -Verbose
VERBOSE: Attempting to connect using SSPI
VERBOSE: Could not establish trust relationship for the SSL/TLS secure channel with authority '<MyvCenterServer>'.
VERBOSE: Connect using SSPI was unsuccessful
VERBOSE: Could not establish trust relationship for the SSL/TLS secure channel with authority '<MyvCenterServer>'.
Connect-VIServer : 2/15/2019 10:07:04 AM Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option to Prompt if you'd like to
connect once or to add a permanent exception for this server.
Additional Information: Could not establish trust relationship for the SSL/TLS secure channel with authority '<MyvCenterServer>'.
At line:1 char:1
+ Connect-VIServer <MyvCenterServer> -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
PS C:\Windows\system32>