我們的在線遷移從SharePoint 2010幾個網站集到SharePoint,如何添加「查看所有網站內容鏈接」使用PowerShell/JQuery的
雖然POC我們看到了「查看所有網站內容」鏈接被刪除,並且在對用戶不可見。
有什麼方法可以使用PowerShell或JQuery明確添加「查看所有網站內容」鏈接。
此外,我看到我們可以添加鏈接使用,我們可以將其添加到右上角的現有菜單。
在此先感謝
帕魯
我們的在線遷移從SharePoint 2010幾個網站集到SharePoint,如何添加「查看所有網站內容鏈接」使用PowerShell/JQuery的
雖然POC我們看到了「查看所有網站內容」鏈接被刪除,並且在對用戶不可見。
有什麼方法可以使用PowerShell或JQuery明確添加「查看所有網站內容」鏈接。
此外,我看到我們可以添加鏈接使用,我們可以將其添加到右上角的現有菜單。
在此先感謝
帕魯
充分披露,我爲Sharegate工作。我們的開發人員之一創建了這個PowerShell腳本來幫助您!
首先,您可以安裝SharePoint Online Management Shell嗎? https://www.microsoft.com/en-gb/download/details.aspx?id=35588
然後,運行下面的PowerShell腳本(修改您的網站,登錄名和密碼):
# Begin the process
$loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
$loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
$loadInfo3 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.UserProfiles")
# Change to match your tenant information
$webUrl = "<your-site-url>"
$username = "<your-admin-login>"
$password = "<your-admin-password>"
$securePass = ConvertTo-SecureString $password -AsPlainText -Force
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)
# Get the collection of navigation nodes from the quick launch bar
$web = $ctx.Web
$quickLaunch = $web.Navigation.QuickLaunch
# Add a new navigation node
$navNode = New-Object Microsoft.SharePoint.Client.NavigationNodeCreationInformation
$navNode.AsLastNode = $true
$navNode.Title = "Site Contents"
$navNode.Url = $web.Url + "_layouts/15/viewlsts.aspx"
$navNode.IsExternal = $false
$ctx.Load($quickLaunchColl.Add($navNode))
$ctx.ExecuteQuery()
Write-Host "Done!"
讓我知道這是如何工作!
非常感謝您的幫助,我將盡快運行此腳本並讓您知道結果。 同時,我想知道這個問題是否是通過Sharegate移植網站時的常見事情?遷移後快速啓動中的「網站內容」鏈接消失。 –
原因是因爲該鏈接不在版本2007和2010的導航中,而是在SharePoint佈局中。截至2013年,某些網站模板甚至沒有它們的佈局。所以這可能是怎麼回事......它出現在導航中,但它不是一個真正的導航元素。合理? – Mia
是的它是有道理的,謝謝你的答覆和腳本工作絕對好,只是我不得不添加一個條件來檢查,如果鏈接已經存在,然後腳本不應該添加一個新的鏈接,因爲它使冗餘。 再次感謝! –
沒有人回答這個問題,???? –
我們使用ShareGate遷移網站。 –