Get count of all SharePoint Webs in a Web Application

This script opens an SPWebApplication object for the given url, retrieves the Site Collections, and counts the webs in each.  Assumptions The script assumes the following: you are either using the SharePoint Management Shell or have imported the Microsoft.SharePoint.Powe

 
 
 
 
 
3 Star
(8)
Add to favorites
SharePoint
12/6/2011
E-mail Twitter del.icio.us Digg Facebook
  • what the % sign means in the command below
    1 Posts | Last post August 23, 2019
    • $webapp.Sites | % { $allWebsCount += $_.AllWebs.Count; $_.Dispose(); }