I have two lists. One is on site A which is on server A and the second one on site B on server B. So i decided to use PowerShell to export the list on site A and then grab the export and load it to the list on site B, but i only want to export the new items, if any.

Any ideas how i could only pick up the new items from a list. The new image will only show is if the date/time is less than two days old on the item lists.


I would do this as a event receiver versus some kind of powershell script. Your best bet would be to add a hiddent field to the list that signifies whether it has been copied or not making it easier to identify the records that need to be moved over.

You may also be able to use Content Deployment depending on the particulars.


Mike thanks for the response. Actually i explain well in my intial post.I wanted to use powershell to export that data to csv and then import the csv data to the second sharepoint list How to use Event Receiver in this case when the 2 lists are on 2 different services/server. Please elaborate

  • See ilovesharepoint.codeplex.com and PowerEventReceivers there – Alexey Krasheninnikov Jul 21 '10 at 9:33

any list should have a modified and created date. This information needs to be exported in your csv files. On the other farm you would run a script thats gets the items by a unique identifier maybe the id or you create a new column for sync information. I've done this for a sql to sharepoint replication. I write a GUID in this field. During import/export i'm checking an filling this field. Now you can sync the items in both directions. Checking the modified date will help to see if the item was modified and needs replication.

This way you can identify items that have never been synced and synced items can be checked on modified date. If needed the column with the GUID can be set to hidden, so users don't get confused.

More info's on updateing system infos of lists:



Ciao Marco

  • Thanks Marco. I'm almost there with my powershell script:) I can check for the modified date to check if items has been modified and then update. The current excel sheet i export now exports all the data so i was thinking of deleting all items and then add new ones. I was thinking of only exporting only new records but how to do this in powershell? – Patrick Jul 7 '10 at 13:41
  • Hi, you could write a caml query and get the returned items and only work with them. The last export date could be stored in web properties and be the base for the caml call. For building caml you can search for caml builder. – Marco Scheel Jul 8 '10 at 18:28

If you can get away with syndication instead of duplication (which would mean it would be read only on one site), I would try to build some kind of view that reads from the list in the "master" site, e.g. a custom web part that uses the OOTB web services to retrieve the data. Don't forget to add caching.

  • Jaap i don't worry too much about duplication as i can check that in my script.But i was thinking of creating a view in the list that shows new records and then export that view to csv for import but don't know how i can do that in powershell?Any ideas – Patrick Jul 7 '10 at 13:44
  • Do you want to synchronise in both directions? – Jaap Vossers Jul 8 '10 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.