Jun 10 2020 02:31 AM
I've created a report using PowerShell to get an overview of inactive SharePoint Sites using the LastContentModifiedDate property of the SharePoint object.
But when I compare the date to the last modified in the SharePoint Admin I'm getting a different date.
It looks like the LastContentModifiedDate is nog reflecting the correct date.
Tried this on different Tenants and SharePoint sites. Is this correct of is there a better way to get the Last-Content-Modified date using powershell?
Feb 26 2021 12:42 AM - edited Feb 26 2021 12:43 AM
@Istvan Ybema
Apparently that date gets update by some kind of timer job.
You can find the correct date with the LastItemUserModifiedDate property of the web object.
$oWeb = Get-PnPWeb -Includes LastItemUserModifiedDate
$oContentModifiedDate = $oWeb.LastItemUserModifiedDate