vCenter 4.1 Update 2
PowerCLI 5.1 Release 1
I can successfully retrieve VMHost's IDs via:
Get-VMHost | Select Name,@{N='VMHostID';E={$_.ExtensionData.Config.Host.Value}}
I can also (appear) to successfully create a VIProperty for VMHostID with:
New-VIProperty -Name VMHostID -ObjectType VMHost -ValueFromExtensionProperty Config.Host.Value
However, when I try to use it I am greeted with an exception and no values in VMHostID
Get-VMHost | Select Name,VMHostID
CategoryInfo : [Get-VMHost], InvalidProperty
FullyQualifiedErrorId: Client20_ExtensionDataHelper_GetExtensionDataByObjectContent_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost
I get the same result on multiple vCenters of the same version. Creating VIProperties from other VMHost extension properties work without issue.
Is anyone able to reproduce this?