I'm trying to get modified date from version history by PowerShell, with Sharepoint Online. Using PnP, I did
$Ctx = Get-PnPContext
$Item = Get-PnPListItem -List "Documents" -Id xxxxx
$File = $Item.File
$Versions = $File.Versions
$Ctx.Load($File)
$Ctx.Load($Versions)
$Ctx.ExecuteQuery()
$LastVersion = $Versions[$Versions.Count-1] # previous version
I supposed that $LastVersion.Created was Modifed Date of that version, but it's not the date displayed as "Modified Date" of OneDrive's version history which is correct.
Could anyone help to get the correct modified date of such old version?