Pre-provision OneDrive for users in your organization

By default, the first time that a user browses to their OneDrive it's automatically provisioned for them. In some cases, such as the following, you might want your users' OneDrive locations to be ready beforehand, or pre-provisioned:

  • Your organization has a custom process for adding new employees, and you want to create a OneDrive when you add a new employee.

  • Your organization plans to migrate from SharePoint Server on-premises to Office 365.

  • Your organization plans to migrate from another online storage service.

This article describes how to pre-provision OneDrive for your users by using PowerShell.

Pre-provision OneDrive for users

  1. If you're pre-provisioning OneDrive for many users, create a list of these users and save it as a file. For example, create a text file named Users.txt that contains: user1@contoso.com user2@contoso.com user3@contoso.com

  2. Download the latest SharePoint Online Management Shell.

    Note

    If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall “SharePoint Online Management Shell.”
    On the Download Center page, select your language and then click the Download button. You’ll be asked to choose between downloading a x64 and x86 .msi file. Download the x64 file if you’re running the 64-bit version of Windows or the x86 file if you’re running the 32-bit version. If you don’t know, see https://support.microsoft.com/help/13443/windows-which-operating-system. After the file downloads, run it and follow the steps in the Setup Wizard.

  3. Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. To learn how, see Getting started with SharePoint Online Management Shell.

  4. Run the PowerShell command Request-SPOPersonalSite. If you created a file in step 1, first define the $emails variable to point to this file by running:

$users = Get-Content -path "C:\Users.txt"

To verify that OneDrive has been created for your users, see How to display a list of OneDrive for Business site collections.

Note

If you are pre-provisioning OneDrive for many users, it might take up to 24 hours for the OneDrive locations to be created. If a user's OneDrive isn't ready after 24 hours, please contact Support.

See also

Plan hybrid OneDrive for Business