SharePoint 2013 – Add and Remove Link Items From Search Navigation Using PowerShell

Sunday, May 11, 2014

Here’s a quick tip on how to add link items to SharePoint 2013 search navigation and how to remove items from search navigation. Add Items: $sites=Get-SPsite http://testsite -Limit all | Get-SPweb $node1 = new-object -TypeName "Microsoft.SharePoint.Navigation.SPNavigationNode" -ArgumentList "Link1", "http://site/sites/Search/Pages/pageA.aspx", $true $node2 = new-object -TypeName "Microsoft.SharePoint.Navigation.SPNavigationNode" -ArgumentList "Link2", "http://site/sites/Search/Pages/PageB.aspx", $true $node3 = new-object -TypeName "Microsoft.SharePoint.Navigation.SPNavigationNode" -ArgumentList "Link3", "http://site/sites/Search/Pages/PageC.aspx", $true foreach ($web in $sites) { $web.Navigation.SearchNav.AddAsFirst($node1) $web.Navigation.SearchNav.AddAsFirst($node2) $web.Navigation.SearchNav.AddAsFirst($node3) } Remove items: $navItems=@(); $sites=Get-SPsite http://testsite -Limit all | Get-SPweb foreach($web in $sites){ $navs = $web.Navigation.SearchNav foreach ($nav in $navs) { $nodeid =$web.Navigation.GetNodeById($nav.Id) $idItems+=$nodeid write-host "add id...

SharePoint: Getting Authentication Login Prompt When Trying To Open Office Document With Unique Permissions

Tuesday, November 6, 2012

The problem is in opening an Office document which is saved in SharePoint 2010: When a user has a "read" permission only to a specific document in a document library, but do not have any permissions in the document library level nor the site level. When he is accessing the document, he receives the "Download File" message with "Open" / "Save" / "Cancel" options. When clicking "Open", he is prompted with a user & password message. When clicking his correct user and password, the user & password message remains – nothing happens. Only when clicking "Cancel" in the user &...

SharePoint: Save Site As Template Common Errors/Mistakes

Tuesday, September 4, 2012

Hi guys, I’ll try to explain couple of common mistakes/errors made when trying to save a site as site template. 1) Save publishing site as site template. The Problem Common mistake is made when trying to save publishing site as site template , There is a  good reason why this publishing template is not supported and does not include the ‘Save as Template’ link, There is a workaround to enable this feature as explained in this post. It maybe a quick solution but in the long run this solution is very problematic when later trying to upgrade the site templates generated from this...

Creating Content Source based on his content type using SharePoint PowerShell

Wednesday, October 19, 2011

Hi guys   Here's a way to create a content source based on his content type like   "SharePoint sites" or "Web Sites" etc...   if($myType -eq "Web"){ $webCS=$ssaContent.ContentSources.Create(, $contentSourceName); $webCS.startAddresses.Add($siteUrl); } if($myType -eq "SharePoint"){ $sharePointCS=$ssaContent.ContentSources.Create(, $contentSourceName); $sharePointCS.startAddresses.Add($siteUrl); } if($myType -eq "File"){ $fileCS=$ssaContent.ContentSources.Create(, $contentSourceName); $fileCS.startAddresses.Add($siteUrl);}   That's all Folks :)
one comment