One of our Vcenters was upgraded to 7.0. I can connect to it with a browser just fine.
When I try to connect to it via powershell, I get
"Connect-viserver : Object reference not set to an instance of an object."
I found a article about having an older version causing this, so I unistalled powercli modules and then powercli. I ran Install-Module -Name VMware.PowerCLI. When I run get-powercliversion, it shows 12.0.0 I tried uninstalling again. Downloaded 12.7 dropped it all in my documents/windowspowershell/modules folder. still shows 12.0....
What in the world do I need to do to get 12.7?
I'm not sure if that cmdlet still works correctly.
The better way is to use the Get-Module cmdlet I showed earlier.
Do you see more than 1 set of PowerCLI folders being returned by the Get-Module cmdlet?
I mean in different folders?
Update: I just tested the Get-PowerCLIVersion cmdlet and for me it returns the correct version (12.7)
So I suspect you might have multiple PowerCLI installations.
Which folders are listed when you do that Get-Module?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
What does it return when you do
Get-Module -Name VMware* -ListAvailable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Below will be what is there rght before running (again) these commands to uninstall powercli. I guess it did not remove it from all locations, as it's still there.
(Get-Module VMware.PowerCLI -ListAvailable).RequiredModules | Uninstall-Module -Force
Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module -Force
Script 12.6.0.... VMware.CloudServices
Script 7.0.3.1... VMware.DeployAutomation
Script 7.0.3.1... VMware.ImageBuilder
Manifest 12.7.0.... VMware.PowerCLI
Editted for content
That definitely is PowerCLI 12.7
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When I check the version I get this.
PowerCLI Version
----------------
VMware PowerCLI 12.0.0 build 15947286
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.0 build 15939652
VMware Cis Core PowerCLI Component PowerCLI Component 12.0 build 15939657
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.0 build 15939655
I'm not sure if that cmdlet still works correctly.
The better way is to use the Get-Module cmdlet I showed earlier.
Do you see more than 1 set of PowerCLI folders being returned by the Get-Module cmdlet?
I mean in different folders?
Update: I just tested the Get-PowerCLIVersion cmdlet and for me it returns the correct version (12.7)
So I suspect you might have multiple PowerCLI installations.
Which folders are listed when you do that Get-Module?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
After running the uninstall a couple more times, and it erroring on some 12.0 files saying they were in use. I manually deleted all the vmware folders in the module directory. I copied over my downloaded 12.7 folders and I can now connect to the 7.0 vsphere. EDIT... Get-powercliversion also returns 12.7