< Back

Get-HPERedfishIndex

Tue Jan 14, 2020 1:57 am

NAME Get-HPERedfishIndex



SYNOPSIS

Gets an index structure of the HPE Redfish API data.





SYNTAX

Get-HPERedfishIndex [[-Session] <PSObject>] [-DateAndTime] [-ExtRef] [-Schema] [-Log]

[-DisableCertificateAuthentication] [<CommonParameters>]





DESCRIPTION

Using a passed in Redfish API session, the cmdlet recursively traverses the Redfish API tree and indexes

everything that is found. Using the switch parameters, the user can customize what gets indexed. The returned

index is a set of key-value pairs where the keys are the terms in the HPE Redfish data source and the values are

list of occurances of the term and details of the term like Property name or value where the term is found, the

odataids to access the data item and its schema, etc.





PARAMETERS

-Session <PSObject>

Session PSObject returned by executing Connect-HPERedfish cmdlet. It must have RootURI and X-Auth-Token for

executing this cmdlet.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-DateAndTime [<SwitchParameter>]

Switch value that causes the iLO Data and Time node to be indexed when true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ExtRef [<SwitchParameter>]

Switch value that causes external refrences to be indexed when true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Schema [<SwitchParameter>]

Switch value that causes Schemas to be in indexed when true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Log [<SwitchParameter>]

Switch value that causes IML and IEL logs to be indexed when true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DisableCertificateAuthentication [<SwitchParameter>]

If this switch parameter is present then server certificate authentication is disabled for the execution of

this cmdlet. If not present it will execute according to the global certificate authentication setting. The

default is to authenticate server certificates. See Enable-HPERedfishCertificateAuthentication and

Disable-HPERedfishCertificateAuthentication to set the per PowerShell session default.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.Management.Automation.PSCustomObject

You can pipe Session object obtained by executing Connect-HPERedfish cmdlet to Get-HPERedfishIndex





OUTPUTS

System.Collections.SortedList

Get-HPERedfishIndex returns a sorted list of key-value pairs which is the index. The keys are terms in the HPE

Redfish data source and values are details of keys like Porperty name and value where the key is found, odataid to

access the key and the schema odataid for the property.





NOTES





See typical usage examples in the HPERedfishExamples.ps1 file installed with this module.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$index = Get-HPERedfishIndex -Session $s



PS C:\\> $index.Keys -match "power"

AllocatedPowerWatts

AutoPowerOn

AveragePowerOutputWatts

BalancedPowerPerf

CollabPowerControl

DynamicPowerResponse

DynamicPowerSavings

FastPowerMeter

HpPowerMeter

HpPowerMetricsExt

HpServerPowerSupply

LastPowerOutputWatts

MaxPowerOutputWatts

MinProcIdlePower

MixedPowerSupplyReporting

OldPowerOnPassword

Power

PowerAllocationLimit

PowerandResetPriv

PowerAutoOn

PowerButton

PowerCapacityWatts

PowerConsumedWatts

PowerMeter

PowerMetrics

PowerOnDelay

PowerOnLogo

PowerOnPassword

PowerProfile

PowerRegulator

PowerRegulatorMode

PowerRegulatorModesSupported

PowerSupplies

PowerSupplyStatus

PowerSupplyType

PushPowerButton

VirtualPowerAndResetPriv



PS C:\\> $index.PowerMeter





PropertyName : PowerMeter

Value : @{@odata.id=/redfish/v1/Chassis/1/Power/PowerMeter/}

DataOdataId : /redfish/v1/Chassis/1/Power/

SchemaOdataId : /redfish/v1/SchemaStore/en/HpPowerMetricsExt.json/

Tag : PropertyName



PropertyName : @odata.id

Value : /redfish/v1/Chassis/1/Power/PowerMeter/

DataOdataId : /redfish/v1/Chassis/1/Power/

SchemaOdataId : /redfish/v1/SchemaStore/en/HpPowerMetricsExt.json/

Tag : Value



PropertyName : PowerMeter

Value : @{@odata.id=/redfish/v1/Chassis/1/Power/PowerMeter/}

DataOdataId : /redfish/v1/Chassis/1/Power#/PowerSupplies/0/

SchemaOdataId : /redfish/v1/SchemaStore/en/Power.json/

Tag : PropertyName



PropertyName : @odata.id

Value : /redfish/v1/Chassis/1/Power/PowerMeter/

DataOdataId : /redfish/v1/Chassis/1/Power#/PowerSupplies/0/

SchemaOdataId : /redfish/v1/SchemaStore/en/Power.json/

Tag : Value



PropertyName : @odata.id

Value : /redfish/v1/Chassis/1/Power/PowerMeter/

DataOdataId : /redfish/v1/ResourceDirectory/

SchemaOdataId : /redfish/v1/SchemaStore/en/ComputerSystemCollection.json/

Tag : Value



This example shows how to create and use the index on an HPE Redfish data source. First, the index is created

using Get-HPERedfishIndex cmdlets and store the created index. The index stores key-value pairs for the entire

data source. The term "power" is searched in the keys of the index and it returns all the keys which has "power"

as substring. When a specific key "PowerMeter" is seleted, the list of values is displayed where PowerMeter was

encountered in the HPE redfish data.











RELATED LINKS

http://www.hpe.com/servers/powershell