Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Expanding multiple NoteProperties??

$
0
0

I really should be able to figure this out!  I'm playing with the HPILO Cmdlets.  One of them, Get-HPILOHealthSummary, has multiple expandable properties

So, this is basic output of  Get-HPiLOHealthSummary -server xxxxx -username xxx-password xxx|select *

STATUS_TYPE        : OK
STATUS_MESSAGE     : OK
DRIVE_STATUS       : Ok
FANS               : {@{STATUS=OK}, @{REDUNDANCY=REDUNDANT}}
POWER_SUPPLIES     : {@{STATUS=FAILED}, @{REDUNDANCY=NOT REDUNDANT}}
TEMPERATURE_STATUS : OK

However, I just want to return the STATUS field from FANS and POWER_SUPPLIES.

This is output from Get-HPiLOHealthSummary -server xxxxx -username xxx-password xxx|select * -expand Power_supplies

STATUS             : FAILED

STATUS_TYPE        : OK
STATUS_MESSAGE     : OK
DRIVE_STATUS       : Ok
FANS               : {@{STATUS=OK}, @{REDUNDANCY=REDUNDANT}}
POWER_SUPPLIES     : {@{STATUS=FAILED; IP=xxx; HOSTNAME=xx; STATUS_TYPE=OK; STATUS_MESSAGE=OK; DRIVE_STATUS=Ok; FANS=System.Object[]; POWER_SUPPLIES=System.Object[];
                     TEMPERATURE_STATUS=OK}, @{REDUNDANCY=NOT REDUNDANT}}
TEMPERATURE_STATUS : OK

REDUNDANCY         : NOT REDUNDANT

STATUS_TYPE        : OK
STATUS_MESSAGE     : OK
DRIVE_STATUS       : Ok
FANS               : {@{STATUS=OK}, @{REDUNDANCY=REDUNDANT}}
POWER_SUPPLIES     : {@{STATUS=FAILED; IP=xxx; HOSTNAME=xxx; STATUS_TYPE=OK; STATUS_MESSAGE=OK; DRIVE_STATUS=Ok; FANS=System.Object[]; POWER_SUPPLIES=System.Object[];
                     TEMPERATURE_STATUS=OK}, @{REDUNDANCY=NOT REDUNDANT; IP=xxx; HOSTNAME=xxx; STATUS_TYPE=OK; STATUS_MESSAGE=OK; DRIVE_STATUS=Ok; FANS=System.Object[];
                     POWER_SUPPLIES=System.Object[]; TEMPERATURE_STATUS=OK}}
TEMPERATURE_STATUS : OK

How do I select only the STATUS field from the expandable properties?  I assume the confusion is arising because there are two power supplies




Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>