Introduction

This script will help to export the Version details and Check-In Comments (Version Comments) for each Document in SharePoint Document Library.

How to use this script?

PowerShell
Edit|Remove
ExportDocLibVersionComments -siteURL "http://SiteURL/" -DocLibName "Doc Lib Name" -ReportFilePath "C:\versions.csv"

Output

In SharePoint, Consider you have a document library with 

 

[Output 1]: the Site URL is not valid

You have provided invalid SharePoint Site URL

[Output 2]: the document library is not exists 

You have provided a valid SharePoint Site URL, but the Document Library Name is not found or not correct


[Output 3]: the document library is empty

You have provided a valid SharePoint Site URL and a valid Document Library name, but the Document Library doesn't contain any documents.


[Output 4]: the document library has documents with version-enabled

You have added a document or add a new version to existing files and set its version comments as shown below

Now, you need to edit the file to add its Title, then provide a new Check-in Comments as shown below

The Version History should look like

So, the output of our script should be

The exported file should like

Applies To