1

I need to communicate an important information (picture) on Team Site homepages so I decided to add on the top of every homepages an Image Webpart (to know : homepages already has some webparts). I uploaded the picture in the SP 'Site Assets' folder and then tried to proceed by executing the following Powershell command :

Add-PnPClientSideWebPart -Page ModernPage -Section 1 -Column 1 -Order 1 -DefaultWebPartType Image -WebPartProperties @{imageSource ="https://tenant.sharepoint.com/sites/MySite/SiteAssets/MyImage.jpg"}

The command works fine and add the webpart to the page, BUT AT POSITION 2 !!!

My image on position 2...

Is there a way to force my webpart to be on position 1?

1 Answer 1

0

Try the below code snippets:

Set Properties -Order 0

Add-PnPPageWebPart -Page $page -DefaultWebPartType ImageGallery -WebPartProperties $convertedjsonImagesss  -Order 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.