【问题标题】:Powershell Add-PSSnapin VMWare.VimAutomation.Core issuesPowershell Add-PSSnapin VMWare.VimAutomation.Core 问题
【发布时间】:2016-09-05 19:29:30
【问题描述】:

我刚刚从 Powershell 4 和 PowerCLI 4.* 更新到 Powershell 5 和 PowerCLI 6.*。更新后,添加/使用管理单元VMWare.VimAutomation.Core 不起作用:

PS C:\Users\Me> Add-PSSnapin VMWare.VimAutomation.Core
Add-PSSnapin : Unexpected error: A connection core service provider is already registered. Cannot register new one.

尝试删除时:

PS C:\Users\Me> Remove-PSSnapin VMWare.VimAutomation.Core
Remove-PSSnapin : No Windows PowerShell snap-ins matching the pattern 'VMWare.VimAutomation.Core' were found. 
Check the pattern and then try the command again.

Get-PSSnapin -Registered,我得到:

Name        : VMware.VimAutomation.Core
PSVersion   : 4.0
Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets for managing vSphere.

【问题讨论】:

    标签: powershell powercli


    【解决方案1】:

    我卸载并重新安装了 PowerCLI 6.3,一切都已修复。 Get-PSSnapin -Registered 现在返回以下内容:

    Name        : VMware.VimAutomation.Core
    PSVersion   : 5.0
    Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets for managing vSphere.
    

    还要注意:VMware.VimAutomation.Core 在此版本的 PowerCLI 中既是一个模块又是一个管理单元。

    【讨论】:

      猜你喜欢
      • 2015-07-15
      • 2018-11-20
      • 1970-01-01
      • 2012-05-28
      • 1970-01-01
      • 1970-01-01
      • 2019-08-23
      • 1970-01-01
      • 2010-12-01
      相关资源
      最近更新 更多