How to get list of all documents/sites/pages and their last modified date along with its site link, in SharePoint 2010 Farm ?
1 Answer
I suggest you use power shell to get these attributes
Get the last modified date of all site collections (including sites):
#Set-ExecutionPolicy RemoteSigned
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$url="http://portal.global.com" #Provide your web app Url
$site = New-Object Microsoft.SharePoint.SPSite($url)
Add-Pssnapin "Microsoft.SharePoint.PowerShell"
$spWebApp = $site.WebApplication
$OutputFN = "c:\ActiveSitesReport.csv" #Path
"Site Name `t URL `t Last Modified" > $OutputFN
# Iterate through all sites:
foreach ( $spSite in $spWebApp.Sites )
{
foreach ($spWeb in $spSite.AllWebs)
{
if ($spWeb.IsRootWeb)
{
$siteName = $spWeb.Title +" - Root";
}
else
{
$siteName = $spSite.RootWeb.Title + " - " + $spWeb.Title;
}
$siteName + "`t" + $spWeb.Url + "`t" + $spWeb.LastItemModifiedDate >> $OutputFN
$spWeb.Dispose()
}
$spSite.Dispose()
}
To get the last modified date of documents and pages, you can refer to the following article:
Please note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.