We have document libraries in Sharepoint 2010 with incorrect modified dates and users (they were imported from somewhere). I thought, I could correct them with Powershell, but it does not work the way I tried and I cannot figure out what is wrong.
It is easy for list items:
$item["Editor"] = $newuser $iten["Modified"] = $newdate $item.update()
I thought, I could adapt this to versions. I can read the properties, but when I try to assign a new value, it throws an error:
Unable to index into an object of type Microsoft.SharePoint.SPListItemVersion. At line:1 char:10 + $version[ <<<< "Modified"]=$newdate + CategoryInfo : InvalidOperation: (Modified:String) , RuntimeE xception + FullyQualifiedErrorId : CannotIndex
What am I doing wrong? Is there another way to change these values?