I have a powershell script that list all webs, sites and subsites on a 2007 farm.
I now know how to get last modified date of those subsites...
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]}
$webapps = @()
foreach ($websvc in $websvcs) {
write-host "Web Applications"
write-host ""
foreach ($webapp in $websvc.WebApplications) {
write-host "Webapp Name -->"$webapp.Name
write-host ""
write-host "Site Collections"
write-host ""
foreach ($site in $webapp.Sites) {
write-host "Site URL --> -->" $site.URL
write-host ""
write-host "Websites"
write-host ""
foreach ($web in $site.AllWebs) {
write-host "Web URL --> --> -->" $web.URL
}
}
}
}
Also, any way to get a object count by subsite and site?
And, finally way to report counts (in powershell or sql) on the folowing:
objects that are web pages (aspx)
objects with code blocks
objects with excel services webparts
objects that appear to be infopath forms
objects with any particular string
Thanks.