Walks through OneDrive for Business sites and sets their locale
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GrantPermissionsForOneDriveOwnership.ps1
LocalizeOneDriveForBusiness.ps1
LocalizeOneDriveForBusinessAutomaticBasedOnUsageLocation.ps1
README.md
RevokePermissionsForOneDriveOwnership.ps1
UsageLocationToLocaleMapping.json

README.md

LocalizeOneDriveForBusiness

This is a script based on @brendankarl's OneDrive for Business localization script as published on his TechNet blog.

Requirements

  • An account with SharePoint Administrator rights in Office 365/SharePoint Online
  • The Microsoft.SharePointOnline.CSOM package, either fron NuGet or via the redist

Execution

  • Download the script and place it in a folder

  • Grant permissions to own OneDrive with:

    GrantPermissionsForOneDriveOwnership.ps1 -TenantServiceDomain contoso -Credentials (Get-Credential)

  • Run the script with the following parameters:

    LocalizeOneDriveForBusiness.ps1 -NewLocaleId 1234 -TenantServiceDomain yourcompany -Credentials (Get-Credential)

Find your Locale ID here.

Your TenantServiceDomain is the bit before .onmicrosoft.com. For example, if your domain is contoso.sharepoint.com, you would specify contoso as TenantServiceDomain.

  • If desired, revoke the OneDrive permissions with:

    RevokePermissionsForOneDriveOwnership.ps1 -TenantServiceDomain contoso -Credentials (Get-Credential)

Notes

  • These scripts do not support MFA. Sorry. You'll need to create a temporary admin account with MFA disabled to use them.
  • If you receive permissions errors, your account may need to be assigned admin permissions on the OneDrive for Business sites. Guidance for this is here.

Resources

To Do

  • Proper comment-based help in the script
  • Automatically assign permission to access site if required