This CSOM script will show you when your SPO Lists were last modified based on the LastItemUserModifiedData property of la SPO List.
So, here goes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
clear #Load SharePoint CSOM Assemblies Add-Type -Path "C:\CSOM\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\CSOM\Microsoft.SharePoint.Client.Runtime.dll" #Variables $SiteURL ="https://pbnet.sharepoint.com/teams/TestSite/test1" Try { #Setup Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get all lists from the Web $Lists = $Ctx.Web.Lists $Ctx.Load($Lists) $Ctx.ExecuteQuery() #Iterate through Lists ForEach($List in $Lists | Where {$_.hidden -eq $false}) { #Get List last modified date Write-Host $List.Title "Last Modified: " $List.LastItemUserModifiedDate } } Catch { write-host -f Red "Error:" $_.Exception.Message } |
The results look similar to this: