【问题标题】:Unable to connect to vCloud Server because of authorization error由于授权错误,无法连接到 vCloud Server
【发布时间】:2019-09-23 13:41:10
【问题描述】:

我正在运行以下命令以使用 PowerShell 连接到 vCloud Director

Connect-CIServer -Server "company.com.au" -User "username" -Password "password" -Org "testorg"

但是,它给了我如下错误:

Connect-CIServer : 20/09/2019 2:13:12 PM  Connect-CIServer
Unable to connect to vCloud Server 'https://company.com.au:443/api/'. The
server returned the following: Unauthorized: ''.
At line:1 char:1
+ Connect-CIServer -Server "company.com.au" -User "username" -Pas ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-CIServer], CIException
    + FullyQualifiedErrorId : Cloud_ConnectivityServiceImpl_ConnectCloudServer_ConnectError,VMware.VimAutomation.Cloud.Commands.Cmdlets.ConnectCIServer

很遗憾,没有提供太多信息,我可以通过相同的凭据登录 UI,但不能在命令行上登录?

我在尝试登录 VCentre 时遇到了类似的问题,我通过忽略证书使其正常工作。不确定对于 VCloud Server,我是否面临同样的问题?

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

【问题讨论】:

    标签: vmware powercli


    【解决方案1】:

    当我删除 -Org 参数时效果很好!所以我登录到 Cloud Director 的命令如下:

    Connect-CIServer -Server "company.com.au" -User "username" -Password "password"
    

    【讨论】:

      猜你喜欢
      • 2021-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-01
      • 2021-11-19
      • 1970-01-01
      • 1970-01-01
      • 2021-11-20
      相关资源
      最近更新 更多