Getting below error while running get-vmhost. any idea?
PowerCLI C:\Windows\system32> Get-VMHost |fl
Get-VMHost : 1/30/2013 2:10:35 PM Get-VMHost Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
At line:1 char:11
+ Get-VMHost <<<< |fl
+ CategoryInfo : NotSpecified: (:) [Get-VMHost], ViError
+ FullyQualifiedErrorId : Client20_QueryServiceImpl_RetrievePropertiesEx_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost
Could you tell us which versions (vSphere/ESXi/PowerCLI/PowerShell) you are using ?
And on which platform (OS and 32/64-bit) you ran this ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
PowerCli5.1
Win7, 32bit
Did your Connect-VIServer complete successfully ?
You can check if there is a connection by displaying
$defaultVIServers
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This is a SOAP issue that .net developers experience sometimes.
Possibly a proxy causing this or the URL is wrong for the SOAP call?
I have seen this issue when i install vCloud Director PowerCli along with vSphere PowerCli. i uninstalled cloud stuff and it is working fine since then..
Also looks like powercli 5.1 is more prone to this than 5.0