【发布时间】:2020-12-16 16:43:36
【问题描述】:
环境
由单个 VMware ESXi 主机组成的家庭 VMware 实验室。
- 客户端版本:1.33.4
- 客户端内部版本号:14093553
- ESXi 版本:6.7.0
- ESXi 内部版本号:14320388
运行脚本的电脑
- Windows 10
- Powershell 5.1
- VMware PowerCLI 12.0.0 内部版本 15947286
- 连接的用户附加了 vmware 管理员角色。
代码
clear-host
$vc = 'my-hhost-ip'
$user='myuser'
$pw='mypassword'
Set-PowerCLIConfiguration -InvalidCertificateAction:ignore
Connect-VIServer -server $vc -Protocol https -user $user -password $pw
错误
Connect-VIServer : Specified method is not supported.
At line:6 char:1
+ Connect-VIServer -server $vc -Protocol https -user $user -password $p ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Connect-VIServer], PSNotSupportedException
+ FullyQualifiedErrorId : NotSupported,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
PSMessageDetails :
Exception : System.Management.Automation.PSNotSupportedException: Specified method is not supported.
TargetObject :
CategoryInfo : NotImplemented: (:) [Connect-VIServer], PSNotSupportedException
FullyQualifiedErrorId : NotSupported,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, <No file>: line 16
PipelineIterationInfo : {}
我尝试过的
留下凭据并让它询问,给出相同的错误
故意输入错误的密码 - 给出错误的密码信息
从用户中删除管理员角色 - 给出未经授权的消息
最后两个测试的输出让我相信我实际上验证正常,但是我没有设置或启用一些设置/服务,允许它在验证后连接。
任何建议将不胜感激。
【问题讨论】:
-
您有评估许可证吗? IIRC 免费许可证不授予 API 访问权限。
标签: powershell vmware