I am having a really strange problem with PowerCLI on a certain vCenter. Any help would be appreciated.
Background:
-On a certain vCenter when I issue the command get-vm I get the following error message:
Get-VM : Object reference not set to an instance of an object.
-Get-VM
gets all the VM objects that vCenter can see and returns an array
populated with the objects. The .NET error that I am getting is saying
that an array cannot be populated with a null object. It cannot get all
the VM's for some reason.
-This can be confirmed by issuing the following command instead:
Get-VMHost <ESX HostName> | get-vm
-This
gets all the VM's from a particular host. That works except for on one
particular host at the moment. When I run the command on the host in
question I get the following error:
Get-VM : Value cannot be null.
Parameter name: array
-So
this should point to a problem with that host. However, if I move all
of the VM's off of that host and try each host individually again, I
will eventually run into the same error:
Get-VM : Value cannot be null.
Parameter name: array
That
tells me that the problem could be following a certain VM (perhaps
permissions where a certain VM's properties cannot be read, etc.). However, If I move the VM's off of the Host one by one and keep testing the host, the problem is not resolved.
Strange, right? Does anyone have any ideas on how to move forward with troubleshooting this? Thank you.
Regards,
Harley Stagner