Created
April 26, 2019 18:10
-
-
Save dev-kperera/be1d2bd41a488b3aea1410085f0cab35 to your computer and use it in GitHub Desktop.
Script to provision OneDrive personal sites using ShareGate PowerShell libraries. More information: https://support-desktop.sharegate.com/hc/en-us/articles/115000641328-Get-OneDrive-URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to Office 365 | |
$tenant = connect-site -Url https://tenant-admin.sharepoint.com -Browser | |
# Get list of emails | |
$eMailCSV = "C:\emailList.csv" | |
$table = Import-Csv $eMailCSV -Delimiter ";" | |
# Iterate through emails and provision OneDrive sites | |
foreach ($row in $table) { | |
Get-OneDriveUrl -Tenant $tenantMoravia -Email $row.email -ProvisionIfRequired | |
} | |
<# | |
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 | |
More information: | |
https://docs.microsoft.com/en-us/onedrive/list-onedrive-urls | |
https://support-desktop.sharegate.com/hc/en-us/articles/115000641328-Get-OneDrive-URL | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment