正如标题所示,我正在尝试使用PowerCLI登录到VMWare vSphere服务器。虽然我运行了
似乎已经进行了配置:
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false -Scope AllUsers
,但当我尝试连接到服务器时,这就是我得到的结果。Connect-VIServer -Server "foobar.server" -User ... -Password ...
Connect-VIServer : 3/30/2020 4:16:46 PM 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 secure channel for SSL/TLS with authority 'foobar.server'.
At line:1 char:1
+ Connect-VIServer -Server "foobar.server" -User ... -Passw ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
似乎已经进行了配置:
Get-PowerCLIConfiguration
Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout
Seconds
----- ----------- ------------------- ------------------------ -------------------------- -------------------
Session UseSystemProxy Multiple Ignore True 300
User Ignore
AllUsers Ignore
为什么我无法连接到服务器?