question

HRisbud-4433 avatar image
0 Votes"
HRisbud-4433 asked HRisbud-4433 commented

SharePoint Online: remove item from quick links webpart

How to delete/remove item from quick links webpart on home page using PnP PowerShell? Please advise using altering JSON

168476-image.png


I can get items using JSON

 # Connect site
 Connect-PnPOnline -Url $siteUrl -UseWebLogin
 $page=Get-PnPClientSidePage -Identity "Home.aspx"
    
 #Get-PnPNavigationNode -Location QuickLaunch
    
 $webParts = $page.Controls | Where-Object {$_.Title -like "Quick links"}  
 #if there are more than one webparts  
 foreach($webpart in $webParts) {  
     Write-Host "WebPart Id - $($webpart.InstanceId) - Title $($webpart.Title)"
        
     $wpitems = $webpart.PropertiesJson | ConvertFrom-Json | select items
     $wpitems.items.Count
     foreach($wpitem in $wpitems.items) {
         $wpitem
     }
 }



office-sharepoint-onlinewindows-server-powershell
image.png (7.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


I am currently looking into this issue and will give you an update as soon as possible.

Thank you for your understanding and support.

0 Votes 0 ·

Any update on this front?

0 Votes 0 ·

0 Answers