MSEndpointMgr

Add Additional Update Languages for Office 365 updates in ConfigMgr with PowerShell

Since ConfigMgr 1602 we’ve had the possibility to manage Office 365 clients. In this first iteration of the feature, we didn’t have support to specify additional update languages other than from what was electable through the deployment wizard or in an Automatic Deployment Rule. This changed in ConfigMgr 1610, however it’s not presented anywhere in the ConfigMgr console. In order to add additional languages for the Office 365 client updates that are being downloaded, we need to make changes to the site configuration.

Supported languages for Office 365 clients

As you can see for instance when selecting to download a single update from within the ConfigMgr console under Software Library > Office 365 Client Management, a supported list of languages by ConfigMgr is shown.

However, the Office 365 client supports additional languages than what’s available from within the ConfigMgr console. It becomes clearly when you for instance leverage the Office Deployment Tool to generate a MSI file:

Add additional update languages with PowerShell

Adding additional update languages for Office 365 updates requires us to change a property value for the SMS_WSUS_CONFIGURATION_MANAGER component. The embedded property object that holds this value is known as AdditionalUpdateLanguagesForO365. First off, we need to specify some details about the top level site that we’re gonna run this script on. Amend the following variables to reflect your environment:

# Top level site server details
$SiteServer = "CM01"
$SiteCode = "P01"

The next step is to locate the SMS_WSUS_CONFIGURATION_MANAGER component required to determine the object for AdditionalUpdateLanguagesForO365.

# Get embedded property list for SMS_WSUS_CONFIGURATION_MANAGER
$WSUSComponent = Get-CimInstance -Namespace "root\SMS\site_$($SiteCode)" -ClassName SMS_SCI_Component -ComputerName $SiteServer | Where-Object -FilterScript { ($_.SiteCode -like $SiteCode) -and ($_.ComponentName -like "SMS_WSUS_CONFIGURATION_MANAGER") }

Once we have the component object stored in a variable, we can move forward to process the Props property of this object. We do this by using a foreach loop in conjunction with an if condition to detect the object with a property name like AdditionalUpdateLanguagesForO365. Once we have the correct object, simply set the Value2 property of this object to a string of the languages that you’d want to add. See the example code below:

# Construct array index for Props property
$PropsIndex = 0
            
# Amend AdditionalUpdateLanguagesForO365 embedded property instance
$Languages = "sv-se, da-dk, fi-fi"
foreach ($EmbeddedProperty in $WSUSComponent.Props) {
    if ($EmbeddedProperty.PropertyName -like "AdditionalUpdateLanguagesForO365") {
        $EmbeddedProperty.Value2 = $Languages
        $WSUSComponent.Props[$PropsIndex] = $EmbeddedProperty
    }

    # Increase Props index
    $PropsIndex++
}

Now that the value has been set, we need to put back the object that we’ve changed. We first create a hash table to point to the property Props that we want to update with the amended object held in $WSUSComponent.Props. This hash table is then passed to the Property param of the Set-CimInstance cmdlet.

# Construct property table
$PropsTable = @{
    Props = $WSUSComponent.Props
}

# Save changes made to existing AdditionalUpdateLanguagesForO365 embedded property instance
Get-CimInstance -InputObject $WSUSComponent | Set-CimInstance -Property $PropsTable

And that’s it, the embedded property object named AdditionalUpdateLanguagesForO365 has now been updated. Below is the combined sample script from the above snippets:

# Top level site server details
$SiteServer = "CM01"
$SiteCode = "P01"

# Get embedded property list for SMS_WSUS_CONFIGURATION_MANAGER
$WSUSComponent = Get-CimInstance -Namespace "root\SMS\site_$($SiteCode)" -ClassName SMS_SCI_Component -ComputerName $SiteServer | Where-Object -FilterScript { ($_.SiteCode -like $SiteCode) -and ($_.ComponentName -like "SMS_WSUS_CONFIGURATION_MANAGER") }
$WSUSAdditionalUpdateLanguageProperty = $WSUSComponent.Props | Where-Object -FilterScript { $_.PropertyName -like "AdditionalUpdateLanguagesForO365" }

# Construct array index for Props property
$PropsIndex = 0
            
# Amend AdditionalUpdateLanguagesForO365 embedded property instance
$Languages = "sv-se, da-dk, fi-fi"
foreach ($EmbeddedProperty in $WSUSComponent.Props) {
    if ($EmbeddedProperty.PropertyName -like "AdditionalUpdateLanguagesForO365") {
        $EmbeddedProperty.Value2 = $Languages
        $WSUSComponent.Props[$PropsIndex] = $EmbeddedProperty
    }

    # Increase Props index
    $PropsIndex++
}

# Construct property table
$PropsTable = @{
    Props = $WSUSComponent.Props
}

# Save changes made to existing AdditionalUpdateLanguagesForO365 embedded property instance
Get-CimInstance -InputObject $WSUSComponent | Set-CimInstance -Property $PropsTable

Download and use the script

As for your convenience I’ve written a PowerShell script called Set-CMAdditionalUpdateLanguagesForOffice365.ps1 that is available on my GitHub repo:

https://github.com/NickolajA/PowerShell/blob/master/ConfigMgr/Site%20Administration/Set-CMAdditionalUpdateLanguagesForOffice365.ps1

To use this script instead of the sample code mentioned above, run the following command:

.\Set-CMAdditionUpdateLanguagesForOffice365.ps1 -SiteServer CM01 -Language sv-SE, da-DK, fi-FI -Verbose

You can also use this script to remove the additional update languages by running:

.\Set-CMAdditionUpdateLanguagesForOffice365.ps1 -SiteServer CM01 -Language "" -Verbose

This will set the Value2 property of the embedded property object to a empty string.

(2742)

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.

Add comment

Sponsors