I found this solution in this forum and I was able to get some information, but with the workflow that we have in the list, we need more information. We have a "Status of Approval" column that we can see when it is updated when I see the version history of the individual article. Is there any way to modify this script to include it in the report? I tried to add it "Approval status" in both places where I see the names of the columns below, but that did not work. AUNT!
# ******* Section of variables ******************
$ WebURL = "http://sharepoint.crescent.com/sites/Sales/"
$ ListName = "Invoice"
$ ReportFile = "D: Invoice_VersionHistory.csv"
Yes (Test-Path $ ReportFile)
Remove article $ ReportFile
$ Web = Get-SPWeb $ WebURL
$ List = $ web.Lists.TryGetList ($ ListName)
# Check if the list exists
if ($ List -ne $ null)
# Get all the items in the list
$ ItemsColl = $ List.Items
# Write report header
Add-Content -Path $ ReportFile -Value "Article ID, label version, created by, created in, title"
# Cut through each element
foreach ($ item in $ ItemsColl)
#Iterate each version
foreach ($ version in $ item.Versions)
# Get the content of the version
$ VersionData = "$ ($ item.id), $ ($ version.VersionLabel), $ ($ version.CreatedBy.User.DisplayName), $ ($ version.Created), $ ($ version[‘Title’]) "
# Write to inform
Add-Content -Path $ ReportFile -Value $ VersionData
Write-Host "The version history has been successfully exported!"