Closed mocopower closed 3 years ago
hi @mocopower
I've updated the cmdlet to support multiple authentication types. Cmdlet can now be executed passing in username/password for arguments, not pass in username/password for arguments which will prompt you to enter using Get-Credential or use iDRAC X-auth token session.
If you use - get_physical_disk_details passing in the controller FQDD, this will return detailed information for all drives behind that controller which you can pipe to Select to only return specific properties. Let me know if this is not the solution you are looking for.
Example:
PS C:\> $disk_details = Get-StorageInventoryREDFISH -idrac_ip 192.168.0.120 -get_physical_disks_details RAID.Integrated.1-1 -x_auth_token 26b2dbe2728de5b43af9e468137ba12c
PS C:\> $disk_details | Select Id,Status
Id Status
-- ------
Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Disk.Bay.7:Enclosure.Internal.0-1:RAID.Integrated.1-1 @{Health=OK; HealthRollup=OK; State=Enabled}
Great set of scripts; the Get-StorageInventoryREDFISH is exactly what I was looking for.
For my personal library, I added PS Credential support and removed the username/password parameters. As a rule, I never put username/passwords in clear text in a script. Adding credential support may be something to consider in the future.
I also agree with the previous poster that output could be cleaned up to be of further use in scripts; ie: i'd like to -get_storage_controllers and pass that to a for-each loop to view physical disk details; but the output makes it a few extra hoops to jump through.