How to copy a folder from SP online to SP onprem using PowerShell

Aase Nomad 246 Reputation points
2022-04-11T14:42:41.45+00:00

I have a folder call "General" in my SharePoint Online site. It's about 16GB and a lot of nested folders inside it. I wanted to copy that folder(including all the nested folders) to a different SharePoint Onprem site while it preserved all the data such as created date, modified date..etc using PowerShell so just wondering if anybody know where I might be able to find a PowerShell script that does that?.

Any suggestion will be really appreciated.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,209 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,565 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,655 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,355 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 30,906 Reputation points Microsoft Vendor
    2022-04-12T06:28:02.497+00:00

    Hi @Aase Nomad ,
    As far as I know, Microsoft does not provide a method that moving files from SharePoint Online to on-premises environment. You will need to use a 3rd party tool such as ShareGate.

    While Microsoft supports and encourages open-source software development, it does not provide technical support for the softwares from third parties, nor does it guarantee that the software will work as described.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. sadomovalex 3,626 Reputation points
    2022-04-19T15:13:30.973+00:00

    if this is one time operation then you may try this: open parent doclib in SPO in Explorer and copy it manually to local file system (like in regular Windows Explorer with copy/paste) or use Sync command to do the same: View SharePoint files in File Explorer. After that open target doclib in SP onprem also in Windows Explorer and paste folder there from your local file system via WebDav.

    0 comments No comments