Forum Discussion

Rob-CTL's avatar
Rob-CTL
Iron Contributor
Feb 06, 2017
Solved

File share to OneDrive for Business File Migration?

Hi   Interesting one, I'm looking to migrate file share data (home drives) to OneDrive for Business using PowerShell.  I've hit a bit of an issue with permissions on "my sites".  For information I'...
  • Zoltan Bagyon's avatar
    Feb 06, 2017

    Just include the following before/after migrating:

     

     

    Set-SPOUser -Site $onedrive -IsSiteCollectionAdmin $true -LoginName migration_admin@yourtenant.com
    # ...migration...
    Set-SPOUser -Site $onedrive -IsSiteCollectionAdmin $false -LoginName migration_admin@yourtenant.com

     

    where $onedrive contains the URL of the user's Onedrive actually being migrated, like:

    "https://yourtenant-my.sharepoint.com/personal/username_yourdomain_com/"

     

    This grants site collection admin rights to the given users Onedrive for the technical user whose credentials are used for the migration, then remove it once you are done.

Resources