Powershell在VMWare.VimAutomation.Core问题中添加PSSnapin

Powershell在VMWare.VimAutomation.Core问题中添加PSSnapin,powershell,powercli,Powershell,Powercli,我刚刚将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.

我刚刚将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.

我卸载并重新安装了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中既是一个模块又是一个管理单元。

我卸载并重新安装了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中既是一个模块又是一个管理单元