I'm trying to add quicklinks webpart with powershell. The webpart is created but the link is not displayed.

I managed to add many Web Parts using the minimum amount of Web Parts data, the json format complicates handling, but I am in trouble with the Quicklinks Web Part. Below is the code I tried using:

Add-PnPClientSideWebPart -Page $page -DefaultWebPartType "QuickLinks" -WebPartProperties @{title="QuickLinksTest";items=@(@{id=1;title="Google";sourceItem=@{url="https://www.google.com"};description="Description 1";altText="altText 1"})}

Can anyone help with this please?

Thank you.

1 Answer 1


I finally found the right minimum data to use to have the expected result:

Add-PnPClientSideWebPart -Page $page -DefaultWebPartType "QuickLinks" -WebPartProperties @{title="QuickLinks 2";items=@(@{sourceItem=@{url="https://www.google.com";itemType=2;fileExtension="";progId=""};title="Google";thumbnailType=3;id=2};@{sourceItem=@{url="https://www.youtube.com";itemType=2;fileExtension="";progId=""};title="Youtube";thumbnailType=3;id=1});hideWebPartWhenEmpty="true"}  

this code can be improved to add and manage display options.

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.