< Back

Format-HPERedfishDir

Tue Jan 14, 2020 1:54 am

NAME Format-HPERedfishDir



SYNOPSIS

Displays HPE Redfish data in directory format.





SYNTAX

Format-HPERedfishDir [-NodeArray] <Object[]> [[-Session] <PSObject>] [-AutoSize] [<CommonParameters>]





DESCRIPTION

Takes the node array returned by Get-HPERedfishDir and displays each node as a directory.





PARAMETERS

-NodeArray <Object[]>

The array created by Get-HPERedfishDir, containing a collection of Redfish API nodes in an array.



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



-AutoSize [<SwitchParameter>]

Switch parameter that turns the autosize feature on when true.



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 NodeArray obtained from Get-HPERedfishDir to Format-HPERedfishDir.





OUTPUTS

System.Management.Automation.PSCustomObject or System.Object[]

Format-HPERedfishDir returns a PSCustomObject or an array of PSCustomObject if Recurse parameter is set to true.





NOTES





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



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



PS C:\\>$odataid = '/redfish/v1/sessions/'



PS C:\\> $nodeArray = Get-HPERedfishDir -Session $s -Odataid $odataid -Recurse



PS C:\\> Format-HPERedfishDir -NodeArray $NodeArray



Location: https://192.184.217.212/redfish/v1/

Link: /redfish/v1/Sessions/



Type Name Value

---- ---- -----

String @odata.context /redfish/v1/$metadata#Sessions

String @odata.id /redfish/v1/Sessions/

String @odata.type #SessionCollection.SessionCollection

String Description Manager User Sessions

Object[] Items {@{@odata.context=/redfish/v1/$metadata#SessionService/Session...

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

PSCustomObject links @{Member=System.Object[]; self=}

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

@odata.id /redfish/v1/Sessions/

Object[] Members {@{@odata.id=/redfish/v1/SessionService/Sessions/admin55dd017b...

Int32 Members@odata.count 1

String MemberType Session.1

String Name Sessions

PSCustomObject Oem @{Hp=}

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

Int32 Total 1

String Type Collection.1.0.0





Link: /redfish/v1/SessionService/Sessions/admin55dd017b39999998/



Type Name Value

---- ---- -----

String @odata.context /redfish/v1/$metadata#SessionService/Sessions/Members/$entity

String @odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

String @odata.type #Session.1.0.0.Session

String Description Manager User Session

String Id admin55dd017b39999998

PSCustomObject links @{self=}

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

String Name User Session

PSCustomObject Oem @{Hp=}

String Type Session.1.0.0

String UserName admin





Link: /redfish/v1/Sessions/



Type Name Value

---- ---- -----

String @odata.context /redfish/v1/$metadata#Sessions

String @odata.id /redfish/v1/Sessions/

String @odata.type #SessionCollection.SessionCollection

String Description Manager User Sessions

Object[] Items {@{@odata.context=/redfish/v1/$metadata#SessionService/Session...

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

PSCustomObject links @{Member=System.Object[]; self=}

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

@odata.id /redfish/v1/Sessions/

Object[] Members {@{@odata.id=/redfish/v1/SessionService/Sessions/admin55dd017b...

Int32 Members@odata.count 1

String MemberType Session.1

String Name Sessions

PSCustomObject Oem @{Hp=}

@odata.id /redfish/v1/SessionService/Sessions/admin55dd017b39999998/

Int32 Total 1

String Type Collection.1.0.0







This example shows the formatted node array obtained from odataid for sessions.The list of Odataid links in a

property are listed below the property name and value











RELATED LINKS

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