sharepoint online – Exporting item version check in comments


You can use this parameter$($version('Check In Comment')) in the PowerShell script to get the 'Check In Comment'. but unfortunately, it gets only the comment of the current item (last version).

So to get the comment for each previous version of the document, try this

$($item.File.Versions.GetVersionFromLabel($version.VersionLabel).CheckInComment)

So try to Mix both parameters to get what exactly you need 🙂

$($item.File.Versions.GetVersionFromLabel($version.VersionLabel).CheckInComment),$($version('Check In Comment'))


OR Download the full script from Export the Version Comments and Version Details for each Document in SharePoint that handle this issue.