I have followed this answer to extract the list of versions in my document library to excel:

However, while the table lists all the versions it only displays (and repeats) the most recent check-in a comment.

Is there any other parameter I can add to the .iqy file that will pull out the comment for each version of the document? (or any other method to achieve the same thing)

1 Answer 1


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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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