Get-VMHost: you have changed the world: DefaultVIServer and global: DefaultVIServers system variables. This is not allowed. Please reset them to $null and reconnect the server vSphere.

Hello world

After the upgrade to PowerCLI version 5.1 however I can't run even the simplest command because it always ends up with the following error:

Get-VMHost: you have changed the world: DefaultVIServer and global: DefaultVIServers system variables. This is not aRA. Please reset them to $null and reconnect the server vSphere.

C:\Users\Albert\AppData\Local\Temp\7900df01-f6c1-48c6-ac1e-047dfff90fb6.ps1:1 tank: 11
+ Get-VMHost < < < <
+ CategoryInfo: NotSpecified: (:)) [Get-VMHost], InvalidState)
+ FullyQualifiedErrorId: VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.InvalidState, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost

Can someone please suggest to me how to fix the script for my v3.2.0 PowerGUI IDE can work with the latest PowerCLI in my computer laptop 64 bit Windows 7?

Thank you.

And I just tried with PowerGui (same versions of PowerGUI and PowerCLI you use), no problem.

Must be something local on your desktop.

Maybe try a uninstall/reinstall of PowerGUI?

Tags: VMware

Similar Questions

Maybe you are looking for