Búsqueda de sitios web

Agregue un vínculo al menú de navegación superior de SharePoint o al inicio rápido mediante PowerShell


Requisito: Agregue un nuevo vínculo a la navegación global de SharePoint (barra de vínculos superior) o al inicio rápido mediante PowerShell.

Agregue un vínculo a la navegación superior de SharePoint mediante PowerShell:

¿Quiere agregar vínculos a su navegación superior o inicio rápido de SharePoint usando PowerShell? Déjame mostrarte cómo hacer precisamente eso:


Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables for processing
$WebURL="https://sharepoint.crescent.com/teams/marketing"
$NavigationTitle="Employee Profile"
$NavigationLink="https://peoplesoft.crescent.com/employee/profile.aspx"

#Get the Web
$Web= Get-SPWeb $WebURL

#Get Top Navigation
$TopNavigation = $Web.Navigation.TopNavigationBar
#For Quick Launch, Use: Navigation.QuickLaunch

#Create a New Top Navigation Node
$node = New-Object Microsoft.SharePoint.Navigation.SPNavigationNode($NavigationTitle, $NavigationLink, $true)

#Add the Node
$TopNavigation.AddAsLast($node)

#Set the Target Property - Will work only when Publishing features is enabled
$node.Properties["Target"] = "_blank"

$node.Update

Puede modificar la secuencia de comandos para agregar un nuevo vínculo a todos los sitios de una colección de sitios.

Artículos relacionados