views:

87

answers:

2

Is there a way to get a total count of all webs in a Site Collection, without enumerating through them?

A: 

I did some research on this a few weeks back and was only able to find information (like this) on enumerating the site collections / sites using stsadm.

There are also third-party tools that can help you achieve this goal. Maybe something from Nintex or Metalogix? I've heard vendors make suggestions but we've never done anything more than wish for them.

Mayo
+1  A: 

SPSite.AllWebs.Count is optimized to return this information without fully enumerating.

Rex M