none
Powershell for Sharepoint Online RRS feed

  • Question

  • Can anyone point me in right direction for powershell script for site copy and list copy in sharepoint online. With limited set of commands in pnp powershell it looks like csom is necessary and i was wondering if anyone has done this before.

    Thanks

    Sunday, April 30, 2017 8:34 AM

All replies

  • Hi Naveen

    In the site copy and list copy, do you mean to include list items, documents, etc..?

    Third party tools can be used like Content Matrix by Metalogix or ShareGate.

    If list schema needs to be copied only, refer to my post Export Lists as Schema XML and Create Lists Libraries from Schema as XML using CSOM. The data from source list to target list can be moved using come custom code to preserve metadata. 

    Similarly you can export site configuration and import site configuration using PnP cmdlet Get‑PnPProvisioningTemplate and Apply‑PnPProvisioningTemplate.

    It seems you can include list data using the PnP cmdlet Add‑PnPDataRowsToProvisioningTemplate, however I have not tried it personally.

    Let us know how you get on.

    Good luck

    Reshmee

    Sunday, April 30, 2017 10:32 AM
  • Hi Reshmee

    Yes we plan to include list items and documents. I have tried using content matrix but running into issues. So powershell is my only option here and environment is SPO.

    The data from source list to target list can be moved using some custom code to preserve metadata. 

    Can i get more insight into this. I'm looking for more details and i don't see any of the hyperlinks working. Please let me know.

    Monday, May 1, 2017 3:50 AM
  • Hi,

    You could check below Site Provisioning and Migration tool for Office 365.

    https://siteprovisioning.codeplex.com/

    Hope this would help.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 1, 2017 8:03 AM
  • This looks like a cool tool. Does it work for site copy and list copy between site collections with in an sharepoint online tenant. Please let me know.
    Monday, May 1, 2017 10:45 PM
  • Hi,

    Seems the tool is not so stable( it may interrupt if got error) based on my test, but you could custom it as it’s open source tool. You could use the user who has higher permission for both site, so you should be able to copy the lists/libraries in different site collections of same tenant.

    The Author had coded many logic for copying lists/libraries so it would take less effort for your requirements.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 2, 2017 7:38 AM
  • Thanks much Lee how can we overcome some of the limitations tool has of not able to migrate List/Library view web part. Please let me know
    Thursday, May 4, 2017 5:46 PM