include noteproperty in output with select-object

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 1 year, 9 months ago.

  • Author
    Posts
  • #29016
    Profile photo of John Curtiss
    John Curtiss
    Participant

    how do I get noteproperties into output using select-object? get-member gives me the following

    [HewlettPackard.Servers.HPServer].Model NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].MonitoringSource NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].NetworkName NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].PhysicalMemory NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].SerialNumber NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].SystemFirmware NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].SystemType NoteProperty Microsoft.EnterpriseManagement.Common.EnterpriseManagementSimpleObject [Hewl...
    [HewlettPackard.Servers.HPServer].TotalDisk

    but 'select-object [HewlettPackard.Servers.HPServer].Manufacturer' isn't returning anything. I've also tried unsuccessfully to use expandproperty and an expression. no dice.

  • #29017
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    if your object is held in variable $obj
    try

    $obj | select-object Manufacturer

    You can list as many properties as you wish e.g.

    $obj | select-object Manufacturer, Model, SerialNumber

You must be logged in to reply to this topic.