< Back

Get-HPERedfishData

Tue Jan 14, 2020 1:55 am

NAME Get-HPERedfishData



SYNOPSIS

Retrieves the data and the schema of the data properties for specified odataid.





SYNTAX

Get-HPERedfishData [-Odataid] <String> [[-Session] <PSObject>] [-DisableCertificateAuthentication]

[<CommonParameters>]





DESCRIPTION

Retrieves the data and the schema of the data properties for data specified by given odataid. This cmdlet returns

two sets of values - data and schema details. The schema details include information like if the data item is

readonly, possible values in enum, enum values' descriptions and datatypes of allowed value.





PARAMETERS

-Odataid <String>

Odataid of the data for which data and properties are to be retrieved.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-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? 2

Default value

Accept pipeline input? true (ByPropertyName)

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.String

You can pipe the Odataid to Get-HPERedfishData.





OUTPUTS

Two objects of type System.Management.Automation.PSCustomObject or one object of System.Object[]

Get-HPERedfishData returns two object of type PSObject. First object has the retrieved data and the second has

schema properties in the form of System.Collections.Hashtable. If you use one variable for returned object, then

the variable will be an array with first term as the data PSObject and second element as the property list in

System.Collections.Hashtable





NOTES





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



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



PS C:\\>$data,$prop = Get-HPERedfishData -Odataid /redfish/v1/systems/1/ -Session $s



PS C:\\> $data





@odata.context : /redfish/v1/$metadata#Systems/Members/$entity

@odata.id : /redfish/v1/Systems/1/

@odata.type : #ComputerSystem.1.1.0.ComputerSystem

Actions : @{#ComputerSystem.Reset=}

AssetTag : Test111

BiosVersion : P89 v2.00 (06/07/2015)

Boot : @{BootSourceOverrideEnabled=Disabled; BootSourceOverrideTarget=None;

UefiTargetBootSourceOverride=None}

Description : Computer System View

HostName : TestServerName

Id : 1

IndicatorLED : Off

Links : @{Chassis=System.Object[]; ManagedBy=System.Object[]}

LogServices : @{@odata.id=/redfish/v1/Systems/1/LogServices/}

Manufacturer : HPE

MemorySummary : @{Status=; TotalSystemMemoryGiB=8}

Model : ProLiant DL380 Gen9

Name : Computer System

Oem : @{Hp=}

PowerState : On

ProcessorSummary : @{Count=2; Model=Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz; Status=}

Processors : @{@odata.id=/redfish/v1/Systems/1/Processors/}

SKU : 501101-001

SerialNumber : LCHAS01RJ5Y00Z

Status : @{Health=Warning; State=Enabled}

SystemType : Physical

UUID : 31313035-3130-434C-4841-533031524A35









PS C:\\Poseidon_SVN\\New_Strategy\\HPERedfish\\trunk\\HPERedfishCmdlets> $prop



Name Value

---- -----

Count @{Schema_Description=The number of processors in the system.; Schema_Type=Syst...

UUID @{Schema_Description=The universal unique identifier for this system.; Schema_...

ResetType@Redfish.Allowable... @{Schema_Description=The supported values for the ResetType parameter.; Schema...

Description @{Schema_Type=object}

TotalSystemMemoryGiB @{Schema_Description=This is the total amount of memory in the system measured...

IndicatorLED @{Schema_Description=The state of the indicator LED.; Schema_AllowedValue=Syst...

.

.

.

Manufacturer @{Schema_Description=The manufacturer or OEM of this system.; Schema_Type=Syst...

IntelligentProvisioningLoca... @{Schema_Description= Location string of Intelligent Provisioning in Firmware ...

Name @{Schema_Type=object}

PushType@Redfish.AllowableV... @{Schema_Description=The supported values for the PushType parameter.; Schema_...

VersionString @{Schema_Description=The version string of the firmware. This value might be n...

BiosVersion @{Schema_Description=The version of the system BIOS or primary system firmware...









PS C:\\> $prop.IndicatorLED





Schema_Description : The state of the indicator LED.

Schema_AllowedValue : {Unknown, Lit, Blinking, Off}

schema_enumDescriptions : @{Unknown=The state of the Indicator LED cannot be determined.; Lit=The Indicator LED is

lit.; Blinking=The Indicator LED is blinking.; Off=The Indicator LED is off.}

Schema_Type : {string, null}

Schema_ReadOnly : False











RELATED LINKS

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