2 Replies Latest reply on Aug 16, 2011 4:00 PM by Zsoldier

    Get-VMHost | Get-View  vs. ExtensionData

    Zsoldier Expert
    vExpert

      Anyone notice a behavior difference in these two examples?  Is this a bug or expected behavior?

       

      This returns nothing

      $VMHost = Get-VMHost hostname

      $VMHost.ExtensionData.Hardware.systeminfo.OtherIdentifyingInfo | where {$_.IdentifierType.Key -eq "servicetag"})

       

      This returns the object I'm looking for:

      $VMHost = Get-VMHost hostname | Get-View

      $VMHost.Hardware.systeminfo.OtherIdentifyingInfo | where {$_.IdentifierType.Key -eq "servicetag"})