Author Posts

August 26, 2015 at 9:13 am

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.

August 26, 2015 at 9:18 am

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