Aktivieren alternativer Sprachen mit PowerShell
für OneDrive for Business Online

HTTP auf HTTPS Umleitung auf Azure App Service Web Apps
31. Juli 2019
Logo Microsoft Identity Manager
Multi-Forest Synchronisation mit Microsoft Identity Manager (MIM) & SharePoint
31. Juli 2019
 

In Office 365 kann man sehr viele Spracheinstellungen treffen. Hier ein Auszug der Möglichkeiten:

  • Konto (My Account -> Settings)
  • Profil (Delve -> Language -> ... -> Language and Region Settings)
  • OneDrive for Business / SharePoint Online SiteCollection (Websiteeinstellungen -> Spracheinstellungen)

Nun hatte ich schon des öfteren die Anforderungen per default, alternative Sprachen, auf allen SiteCollections oder OneDrive for Business Sites zu setzen.

Hier mein PowerShell Script zum setzen auf allen OneDrive for Business Sites:

$username = "admin@youraccount.onmicrosoft.com"
$password = "password"
$adminurl = "https://youraccount-admin.sharepoint.com"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
Connect-SPOService -Url $adminurl -Credential $cred
$sites = get-sposite -IncludePersonalSite 1 -limit All
$onedrivesites = $sites | where {$_.url -like "*my.sharepoint.com/personal/*"}
$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)

foreach($onedrivesite in $onedrivesites)
    {
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($onedrivesite.url)
    $ctx.Credentials = $credentials
    $web = $ctx.Site.RootWeb
    write-Host $ctx.url
    $web.IsMultilingual = $true
    $web.AddSupportedUILanguage(1033) #English
    $web.addsupporteduiLanguage(1031) #German
    $web.addsupporteduiLanguage(1029) #Czech
    $web.addsupporteduiLanguage(1045) #Polish
    $web.Update()
    $ctx.ExecuteQuery()
    }