Useful query to mass add (not change, but add.. change would be a diff query) thresholds to hardware health items and set the warning and critical amount. To make this work, you will need 1 example of the warning and critical json that is created + a filtering mechanism that you can use to filter out/select the hardware health items.
Here is the base of the query:
INSERT INTO [dbo].[APM_HardwareItem_Thresholds] (id, warning, critical)
SELECT ID as id, WarningJsonString, CriticalJsonString FROM [dbo].[APM_HardwareItem]
WHERE DisplayName LIKE '%Something%'
AND DisaplayName LIKE '%Something Else%'
AND ID NOT IN (SELECT ID FROM [dbo].[APM_HardwareItem_Thresholds])
The Something and Something would be the filtering of the name of the hardware health item. The Warning and Critical Json strings would be found within the HardwareItem_Thresholds table via looking at the entry that was made for the one example hardware health item that was set up.