To get the modified by name and modified date of all the sites present in the tenant, you can use PowerShell.
Here are the steps for each method:
Using PowerShell:
-
- Open PowerShell with administrative privileges.
- Connect to your SharePoint Online environment using the following command
Connect-SPOService -Url https://yourdomain-admin.sharepoint.com
Replace "yourdomain" with your SharePoint domain.
- Run the following command to retrieve all site collections:
Get-SPOSite -Limit All
This command will retrieve information about all site collections in the SharePoint Online tenant.
- To display the modified by name and modified date for each site collection, you can loop through the results and extract the desired properties. Here's an example:
$sites = Get-SPOSite -Limit All
foreach ($site in $sites) {
Write-Host "Site URL: $($site.Url)"
Write-Host "Modified By: $($site.LastContentModifiedDateBy.Name)"
Write-Host "Modified Date: $($site.LastContentModifiedDate)"
Write-Host "-----------------------------"
}