Question

I'm trying to get the total count of subsites created in a very large Sharepoint collection. Please note, I don't have direct access to the server.

  • Is there any native sharepoint feature I'm missing that will provide a site count?
  • Is there a webservice that can crawl the collection? (we have google analitics)
  • Are there any other options short of running a powershell script on the server?

Thanks!

Was it helpful?

Solution

I would suggest using the 'Webs' Web Service - you can invoke it by putting /_vti_bin/webs.asmx on the end of your site URL. It has a method GetAllSubWebCollection.

The only gotcha is that you will get filtered results based on the user being used to access the web service. For example, if you have a site collection that has a sub-web created for HR, Business, Management, Sales and IT - but your account only has access to the HR and Sales site - you will only get results back for the HR and Sales sites.

You may also find the SPServices jQuery library helpful as it has wrappers for most of the web services and can make calling them from a client much less painful.

Note: These web services exist for the 2007 and 2010 editions of SharePoint. You didn't mention a specific version but hopefully it is one of these two.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top