How to get list of all documents/sites/pages and their last modified date along with its site link, in SharePoint 2010 Farm?

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/286677

  •  18-02-2021
  •  | 
  •  

Domanda

How to get list of all documents/sites/pages and their last modified date along with its site link, in SharePoint 2010 Farm ?

È stato utile?

Soluzione

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:

https://www.itprotoday.com/file-sharing-and-management/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top