none
Failed to Read the file:Could not get all list item versions RRS feed

  • Question

  • I'm trying to migrate a task list.  The task list has versioning enabled.  The list uses content types.

    I get this error:

    "Item","Failed","READ FAILURE","Failed to Read the file:Could not get all list item versions","0x0131000D"


    David Jenkins

    Saturday, September 21, 2019 2:16 AM

All replies

  • Hey David, were you able to find a resolution? I am facing the same issue.
    Wednesday, September 25, 2019 7:35 PM
  • This is a list.  It has versioning enabled.  I'm considering disabling versioning and removing all the additional versions.

    As I recall for documents just changing the versioning doesn't get rid of the versions. Each entry has to be updated to cleanup the versions.  I am still testing but the script below worked for documents. 

    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {
    	Add-PSSnapin Microsoft.SharePoint.PowerShell;
    	
    }
    
    #Get site and list
    $sourceWebURL = "https://url.com"
    $sourceListName = "Tasks"
    $spSourceWeb = Get-SPWeb $sourceWebURL 
    $spSourceList = $spSourceWeb.Lists[$sourceListName]
    #$spSubFolder = $spSourceList.RootFolder.SubFolders["/Documents"]
    
    "Running Query"
    
    $CAML = "
    
    "
    
    $Query = New-Object Microsoft.SharePoint.SPQuery
    $Query.ViewAttributes = "Scope='RecursiveAll'"
    $Query.Query = $CAML
    $Query.Folder = $spSubFolder
    $items = $spSourceList.GetItems($Query)
    "Count:$($items.Count)"
    
    foreach($item in $items){
    
        $item.SystemUpdate()
    
    }


    David Jenkins


    Wednesday, September 25, 2019 7:56 PM
  • Looks like there is a $item.versions.DeleteAll() also.


    David Jenkins



    Wednesday, September 25, 2019 8:12 PM