Export-Import-SharePoint-List duplicates items

Mar 10, 2015 at 8:59 PM
When I run the Export-Import-SharePoint-List script, instead of overwriting list content with the export, it's adding the items in again resulting in duplication.

Running on a Sharepoint 2010 Publishing site. All I changed were the paths, and set IncludeSecurity to none.


This isn't the way it's supposed to work is it? What am I doing wrong?

Thanks!
Mar 12, 2015 at 7:35 AM
Dear gbarrow,
This script is dedicated to move a list from a site/subsite in another site/subsite.
It was not designed to import data in an existing list.
If you run it in this scenario, you will probably have a file or item import in the list without compare anything existing yet and it will create multiple same item.

Envoyé à partir de mon Windows Phone

De : [email removed]
Envoyé : ‎10/‎03/‎2015 20:59
À : [email removed]
Objet : Export-Import-SharePoint-List duplicates items [SharePointPSScripts:585971]

From: gbarrow

When I run the Export-Import-SharePoint-List script, instead of overwriting list content with the export, it's adding the items in again resulting in duplication.

Running on a Sharepoint 2010 Publishing site. All I changed were the paths, and set IncludeSecurity to none.


This isn't the way it's supposed to work is it? What am I doing wrong?

Thanks!
Marked as answer by gbarrow on 3/12/2015 at 7:01 AM
Mar 12, 2015 at 3:01 PM
Thank you for the reply.

My mistake. I had hoped to use this script to update a copy of the source list on a scheduled basis, and I thought the SPUpdateVersions “Overwrite” option meant the entire contents of the copied list would be overwritten by a subsequent import.

I found a way to accomplish my goal by deleting all items from the copy first, then importing. No doubt there is still a better way to do this.

Thanks for making your script available, and for responding to questions about it.