locked
How can i edit all the quicklaunch links in a site collection? Powershell? RRS feed

  • Question

  • Hi,

    I have a site collection with 27 sites...26 sites are sub-sites that all inherit the same quick launch from the top-level site.

    All links on all the quick launch widgets need changing - manually this is too many - any idea how to edit the url for all links - use pwoershell with a .csv inout ior something?

    I doubt this needs programming but ive not seen an edit quicklaunch powershell command - any ideas please?

    Thanks!

    Monday, March 18, 2019 7:06 PM

Answers

  • Here you go

    $SPWeb.Navigation.QuickLaunch | ForEach-Object {
        if($_.Url -match $FindString){
            $linkUrl = $_.Url
            Write-Host "Updating $linkUrl with new URL"
            $_.Url = $_.Url.Replace($FindString,$ReplaceString)
            $_.Update()
        }


    Please remember to click Mark as Answer on the answer if it helps you

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 4:00 PM
    Monday, March 18, 2019 11:21 PM
  • Here are the links

    https://sharepointryan.com/2013/04/15/fix-sharepoint-quick-launch-links-using-powershell/


    Please remember to click Mark as Answer on the answer if it helps you

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 3:59 PM
    Monday, March 18, 2019 11:21 PM
  • Hi xyz2012,

    You can also export the navigation node XML, change the title and URL, then import the new navigation node xml file using PowerShell.

    More information check the blog: Configuring Quick Launch Navigation in SharePoint Server 2010 Using PowerShell

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 4:00 PM
    Tuesday, March 19, 2019 2:54 AM

All replies

  • Here you go

    $SPWeb.Navigation.QuickLaunch | ForEach-Object {
        if($_.Url -match $FindString){
            $linkUrl = $_.Url
            Write-Host "Updating $linkUrl with new URL"
            $_.Url = $_.Url.Replace($FindString,$ReplaceString)
            $_.Update()
        }


    Please remember to click Mark as Answer on the answer if it helps you

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 4:00 PM
    Monday, March 18, 2019 11:21 PM
  • Here are the links

    https://sharepointryan.com/2013/04/15/fix-sharepoint-quick-launch-links-using-powershell/


    Please remember to click Mark as Answer on the answer if it helps you

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 3:59 PM
    Monday, March 18, 2019 11:21 PM
  • Hi xyz2012,

    You can also export the navigation node XML, change the title and URL, then import the new navigation node xml file using PowerShell.

    More information check the blog: Configuring Quick Launch Navigation in SharePoint Server 2010 Using PowerShell

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Marked as answer by xyz2012 Tuesday, March 19, 2019 4:00 PM
    Tuesday, March 19, 2019 2:54 AM
  • That is a very interesting way to do it!
    Tuesday, March 19, 2019 4:00 PM