We have a workflow, where business users have to update the data in SharePoint every day.

Is there a way to monitor it easily and smart way? Currently I am clicking each folder to the file and I have 30 files and growing.

I tried to explore the Power Apps, they have lot of Power Apps for file modified which I can use in negative terms but every few seconds or minutes users update the file, I will lose it which file when. Also they are not free, and there is no budget.

I have about 30 folders inside a main folder and each folder has a set of files, one spread sheet per folder is where I am keen to know last modified date easily.


Here's full PowerShell for retrieving all folder, sub-folder and files with last modified date for your reference.

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

$SiteURL="site collection URL"
$Password = "xxx"
$listName ="document library name"

$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
$Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,$SecurePassword)

#Bind to Site Collection
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$ctx.Credentials = $Creds

$list = $ctx.Web.Lists.GetByTitle($listName)
$q = New-Object Microsoft.SharePoint.Client.CamlQuery
$q.ViewXml = '<View Scope="RecursiveAll"><Query></Query></View>'
$items = $list.GetItems($q)
foreach($item in $items)
  Write-Host -ForegroundColor green "Name: " $item["FileLeafRef"] ----"Last Modified Time: " $item["Modified"]

Result: enter image description here

  • Hi Emily Du, Thank you very much indeed. But please can you confirm, this script needs to be executed on the SharePoint server. I have a SharePoint client running on my desktop and have no access to the server. I do not seem to have this file access 1. Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll 2. Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Please advise. Best Regards
    – Protocoder
    Jan 5 '21 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.