Import File Share to OneDrive for Business

Comments

6 comments

  • Avatar
    Dorje McKinnon

    This is a useful start - what would be great is some other examples for other scenarios e.g. incremental update ?

  • Avatar
    Alex

    Hello Dorje,

    Thank you so much for the feedback. It is a great idea - we are looking into ways we can improve our PowerShell documentation with more step-by-steps! In the meantime, we think the New Copy Settings and Incremental Update articles will help.

    Have a great day!

  • Avatar
    Ginkel van, Marcel

    I know it is possible to add a time filter with Sharepoint migration, but it also possible to add a time filter for onedrive migration within the Powershell script mentioned above?

  • Avatar
    Alex

    Hello Marcel!

    Yes, you can, you'll want to use the New Property Template script. 

    Example:

    $propertyTemplate = New-PropertyTemplate -AuthorsAndTimestamps -VersionHistory -Permissions -WebParts -NoLinkCorrection -FlattenFolders -VersionLimit 5 -CheckInAs Publish -ContentApproval SameAsCurrent - From YYYY-MM-DD -To YYYY-MM-DD

    Hope that helps!

  • Avatar
    Knibbe, Erik

    Hello Alex,

    We use this script to import the home-folders from our users to OneDrive for Business.

    But we want to skip certain folders inside the home-folders. So, for each home-folder I cycle through all subfolders, selecting which to copy and which not. Then I use this line:

    $Result = Import-Document -SourceFolder "$SourcePath" -DestinationList $DstList -DestinationFolder "$DstFolder" -CopySettings $CopySettings -InsaneMode

    As you can see I added the option -DestinationFolder "$DstFolder"

    This returns the message "The folder X/ does not exist in the destination."

    That's correct, but it has to be created. Unfortunately, I didn't find an option to force that.

    So, my question is: Is there an option to create a folder that doesn't exist in the destination?

    Thanks in advance for your answer!

    Erik Knibbe

     

  • Avatar
    Alex

    Hey Erik!

    We are not aware of an option for that! If you do end up finding a workaround, please feel free to share it.

    Thanks!

Please sign in to leave a comment.