SharePoint online : Changing Hero banner pictures by Code or Script

Occasional Visitor

Hello,

We have a problem on our SharePoint Online : we have more than 600 sites using the webpart Hero banner with 4 pictures. The pictures used in a banner are no longer available, displaying a grey background instead.

We tried to update the picture's url path using a PowerShell Script but we didn't manage to change them. It seems theses url properties are only in read only. We tried with an external picture and an picture in a library and we had the same results : not working.

The script is in the attachment.

 

Do some know if the operation can be done on this webpart ?

 

Best regards.

1 Reply
What about extracting a PnP template of the page where you have the problem, configure the Hero WebPart properly and re-apply the template?