iDRAC-Redfish-Scripting icon indicating copy to clipboard operation
iDRAC-Redfish-Scripting copied to clipboard

Set-IdracLcSystemAttributesREDFISH does not work on iDRAC8

Open javalidapesada opened this issue 1 year ago • 3 comments

please help to find a solution, cant get this working on IDRAC8

javalidapesada avatar Mar 28 '24 17:03 javalidapesada

Hi @javalidapesada

iDRAC 7/8 does not support OEM extension to set individual iDRAC attributes with Redfish, you must leverage Server Configuration Profile (SCP) feature to set iDRAC attributes (scripts below).

Set-ExportServerConfigurationProfileLocalREDFISH Set-ImportServerConfigurationProfileLocalREDFISH Set-ImportServerConfigurationProfileLocalFilenameREDFISH

Can you let me know what attributes you're trying to set so i can send you a workflow example.

Thanks Tex

texroemer avatar Mar 28 '24 18:03 texroemer

Hi Tex, thanks for the rapid reply.

I need to be able to Disable\Enable the attribute EmailAlert.1.Enable.

I am running this on IDRAC9 with success:

Set-IdracLcSystemAttributesREDFISH -idrac_ip <IP> -idrac_username root -idrac_password calvin -attribute_names "EmailAlert.1.Enable" -attribute_group idrac -attribute_values "Disabled"

Should have a way to do it on iDRAC8 as it has the same option under alerts.

Thanks for your help. Daniel

javalidapesada avatar Mar 28 '24 18:03 javalidapesada

Example below using SCP to set attribute EmailAlert.1.Enable to Disabled. Please copy SCP file contents below to create XML file and run the cmdlet. I also left other email alert attributes in the SCP file incase you want to configure them. If not please edit the SCP file and either remove them or comment out.

PS C:\> type .\SCP_file.xml
<SystemConfiguration>
<Component FQDD="iDRAC.Embedded.1">
 <Attribute Name="EmailAlert.1#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.1#Address"/>
 <Attribute Name="EmailAlert.1#CustomMsg"/>
 <Attribute Name="EmailAlert.2#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.2#Address"/>
 <Attribute Name="EmailAlert.2#CustomMsg"/>
 <Attribute Name="EmailAlert.3#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.3#Address"/>
 <Attribute Name="EmailAlert.3#CustomMsg"/>
 <Attribute Name="EmailAlert.4#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.4#Address"/>
 <Attribute Name="EmailAlert.4#CustomMsg"/>
</Component>
</SystemConfiguration>

PS C:\> Set-ImportServerConfigurationProfileLocalFilenameREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password calvin -Target IDRAC -FileName SCP_file.xml
5

- PASS, statuscode 202 returned to successfully create import server configuration profile (SCP) job: JID_116824721214

- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Completed

- INFO, JID_116824721214 job ID marked as completed
- INFO, job completed in @{Minutes=0; Seconds=3}

- Detailed final job status and configuration results for import job ID 'JID_116824721214' -

{"@odata.context":"/redfish/v1/$metadata#Task.Task"
"@odata.id":"/redfish/v1/TaskService/Tasks/JID_116824721214"
"@odata.type":"#Task.v1_7_1.Task"
"Description":"Server Configuration and other Tasks running on iDRAC are listed here"
"EndTime":"2024-03-28T22:21:15-05:00"
"Id":"JID_116824721214"
"Messages":[{"Message":"The operation successfully completed."
"MessageID":"SYS413"
"Oem":{"Dell":{"@odata.type":"#DellManager.v1_0_0.ServerConfigurationProfileResults"
"DisplayValue":"Enable Email Alerts"
"ErrCode":"0"
"FQDD":"iDRAC.Embedded.1"
"Name":"EmailAlert.1#Enable"
"NewValue":"Disabled"
"OldValue":"Enabled"
"Status":"Success"}}
"Severity":"OK"}
{"Message":"Successfully imported and applied Server Configuration Profile."
"MessageArgs":[]
"[email protected]":0
"MessageId":"IDRAC.2.9.SYS053"}]
"[email protected]":2
"Name":"Import Configuration"
"Oem":{"Dell":{"@odata.type":"#DellJob.v1_5_0.DellJob"
"CompletionTime":"2024-03-28T22:21:15"
"Description":"Job Instance"
"EndTime":null
"Id":"JID_116824721214"
"JobState":"Completed"
"JobType":"ImportConfiguration"
"Message":"Successfully imported and applied Server Configuration Profile."
"MessageArgs":[]
"MessageId":"IDRAC.2.9.SYS053"
"Name":"Configure: Import Server Configuration Profile"
"PercentComplete":100
"StartTime":"TIME_NOW"
"TargetSettingsURI":null}}
"PercentComplete":100
"TaskState":"Completed"
"TaskStatus":"OK"}

texroemer avatar Mar 28 '24 22:03 texroemer