jueves, 12 de enero de 2012

Obtener el número de todos los sitios web de SharePoint en una aplicación Web

This script opens an SPWebApplication object for the given url, retrieves the Site Collections, and counts the webs in each.

PowerShell

$webappUrl = "http://localhost"  $webapp = Get-SPWebApplication $webappUrl  $allWebsCount = 0  $webapp.Sites | % { $allWebsCount += $_.AllWebs.Count; $_.Dispose(); }    Write-Host "There are" $allWebsCount "webs" -ForegroundColor Green

Assumptions

The script assumes the following:



  • you are either using the SharePoint Management Shell or have imported the Microsoft.SharePoint.PowerShell snapin



  • you are running on the SharePoint Server



  • you have administrative access to the web application, site collection, and webs


 

Fuente: http://gallery.technet.microsoft.com/scriptcenter/

No hay comentarios:

Publicar un comentario