Articles about European Sharepoint Hosting Service
SharePoint 2013 Hosting – HostForLIFE.eu :: Get Site Collection From Web Application
We can get the subsites under the site using CSOM easily but if we need to get all the site collections under a specific web application from a SharePoint farm, then we can’t get it directly. For that, we have to use SharePoint search. By using SharePoint Search, we set the “KeywordQuery” to filter and get the site collections. Before using the code block, we should ensure that the SharePoint Search Service Application is running and active.
The code block for this is mentioned below.
In this blog, I have explained how you can get all the site Collections under a SharePoint web application. I hope this blog will help you out in a few scenarios.
Print article | This entry was posted by Peter on April 25, 2019 at 7:04 am, and is filed under European SharePoint 2013 Hosting. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |