Guide Pages
For a successful OneDrive site migration in EdbMails, it's important to have the necessary OneDrive sites available on the target server. This can be achieved by creating OneDrive sites for all users on the target server, which ensures that the site collections are accessible for the migration process.
In addition, granting admin access to all OneDrive for Business site collections on both the source and target servers is necessary to ensure that the migration process has the required permissions to access and transfer data from the site collections.
Run the below PowerShell commands as an administrator to create the OneDrive sites on the target server for all the users
Command 1:
Command: Copy
Install-Module -Name ExchangeOnlineManagement -Scope AllUsers
Command 2:
Command: Copy
Connect-ExchangeOnline
Command 3:
Command: Copy
Get-EXOMailbox -ResultSize Unlimited | Select-Object PrimarySmtpAddress | export-csv C:\\users.csv
Command 4:
Command: Copy
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Command 5:
Command: Copy
Import-Module Microsoft.Online.SharePoint.PowerShell
Command 6:
Command: Copy
Connect-SPOService -Url https://<your_tenant>-admin.sharepoint.com
Replace <your_tenant> with the name of your server Microsoft 365 tenant
Command 7:
Command: Copy
$Users = Import-CSV C:\users.csv
Command 8:
Command: Copy
ForEach ($User in $Users) { Request-SPOPersonalSite -UserEmails $User.PrimarySmtpAddress -NoWait }
The above script is designed to create OneDrive for Business site collections for each user specified in a CSV file. Each site collection's URL will be in the format of https://<your_tenant>-my.sharepoint.com/personal/<user_upn>, where "<your_tenant>" is the name of your Microsoft 365 tenant and "<user_upn>" is the user principal name of each user. The owner of each site collection will be set to the corresponding user specified in the CSV file.
Granting administrative access to all OneDrive for Business site collections allows a specified user to manage user permissions and settings for multiple site collections at once. This enables the user to perform administrative tasks across multiple site collections more efficiently, saving time and effort.
Run the below PowerShell commands as an administrator for both source and target servers
Command 1:
Command: Copy
Install-Module -Name ExchangeOnlineManagement -Scope AllUsers
Command 2:
Command: Copy
Connect-ExchangeOnline
Command 3:
Command: Copy
Get-EXOMailbox -ResultSize Unlimited | Select-Object PrimarySmtpAddress | export-csv C:\\users.csv
Command 4:
Command: Copy
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Command 5:
Command: Copy
Import-Module Microsoft.Online.SharePoint.PowerShell
Command 6:
Command: Copy
Connect-SPOService -Url https://<your_tenant>-admin.sharepoint.com
Replace <your_tenant> with the name of your server Microsoft 365 tenant
Command 7:
Command: Copy
$o365login = "<info@domain.onmicrosoft.com>"
Replace the email address <info@domain.onmicrosoft.com> with your actual email address
Command 8:
Command: Copy
Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'" | select Url | export-csv C:\\sites.csv
Command 9:
Command: Copy
$Sites = Import-CSV C:\sites.csv
Command 10:
Command: Copy
ForEach ($Site in $Sites) { Set-SPOUser -Site $Site.Url -LoginName $o365login -IsSiteCollectionAdmin $true }
Click here to know the steps to migrate OneDrive sites using EdbMails
Click here to know the steps to grant admin access to the SharePoint sites
EdbMails Demo / Trial Version
Step 1. Download and install EdbMails
Step 2. Click the 'Start Your Free Trial' button
Hi, May I help you?
Hide Chat Now