Skip to main content

Posts

Showing posts from July, 2015

Get SharePoint List Item Version History

Here is a powershell script you can use to get csv output of version history from SharePoint 2010 list. The output includes changes to individual item fields as viewable from item version history. $web  = Get-SPWeb http://pravahaminfo.com/web  $list = $web.Lists["Document Library"] # Name of the List?library $csvFile = "C:\ListItemVersionHistory.csv" # Save folder Location function GetFieldValue([Microsoft.SharePoint.SPField]$field, [Microsoft.SharePoint.SPListItemVersion]$currentVersion)  {      if(($field.Type -eq "User") -and ($currentVersion[$field.Title] -ne $null))      {          $newUser = [Microsoft.SharePoint.SPFieldUser]$field;          $fieldStr = $newUser.GetFieldValueAsText($currentVersion[$field.Title])          $fieldStr = "$($field.Title): $fieldStr"      }      elseif(($field.Type -eq "...