include noteproperty in output with select-object

Welcome Forums General PowerShell Q&A include noteproperty in output with select-object

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 years, 3 months ago.

  • Author
    Posts
  • #29016

    Participant
    Points: 18
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘include noteproperty in output with select-object’ is closed to new replies.