Monday, November 30, 2015

SharePoint : Update URLs after resotring a content DB of hostnamed site collections


To change or update URLS after resotring a content DB of hostnamed site collections, use
stsadm -o renamesite -oldurl http://abc.com -newurl http://abc-uat.com

You only need to rename the root hostnamed site collection. It will reflect on the other HNSC starting with the same URL.

If you try using Set-SPSiteURL on an HNSC with  same starting url, you will get the error : Could not perform this operation on the site collection
http://abc.com. To add a URL for this site collection add a URL to the root host-named site collection at http://abc.com. At line:1 char:1

Wednesday, November 25, 2015

SharePoint : To search for "Everything" as the default option


To search for "Everything" as the default option, change search navigation settings under site settings > search settings, and add the following links

Everything
/results.aspx
People
/search/Pages/peopleresults.aspx
Conversations
/search/Pages/conversationresults.aspx
This Site
/search/Pages/results.aspx?u={contexturl}