In this article we will cover the process of automating the configuration of an Office Online Server 2016 (OOS) using PowerShell Desired State Configuration. The end result will be a fully working OOS environment that has the French Language Pack installed on. Language pack support is something new I recently added to the OfficeOnlineServerDSC module and which will be available starting with version 1.1.0.0 scheduled to be released on December 20th of 2017.
Prerequisites
In my case, I will be starting with a brand new Windows Server 2016 virtual machine on which I downloaded the installation binaries for OOS, as well as the French language pack. The installation media will be stored in a folder right at the root of my c:\ drive at C:\OOSInstall\:
The Language Packs executables need to be extracted in order for the new OfficeOnlineServerInstallLanguagePack resource to be able to do its job. In my case, I downloaded the French Language Pack from MSDN and stored it into C:\OOSLP\:

In order to extract the content of the Language Packs, we need to call the .exe file with /extract:
C:\OOSLP\fr_office_online_server_language_pack_march_2017_x64_10267265.exe /extract:C:\OOSLP
this will result in the following set of files to be extracted in our folder:

IMPORTANT!!!At the time of publishing this article, OfficeOnlineServerDSC 1.1.0.0 is not yet available on the PowerShell Gallery, therefore you will need to manually acquire it from https://www.GitHub.com/PowerShell/OfficeOnlineServerDSC.
DSC Script
One we have this in place, we are ready to go ahead and execute our DSC configuration script and let the magic happen:
Install-PackageProvider -Name NuGet -Force -Confirm:$false Install-Module OfficeOnlineServerDSC -RequiredVersion 1.1.0.0 -Force -Confirm:$false -EA SilentlyContinue Configuration OOS { Import-DscResource -ModuleName OfficeOnlineServerDSC -ModuleVersion 1.1.0.0 Node localhost { WindowsFeature WebServer { Name = "Web-Server" Ensure = "Present" IncludeAllSubFeature = $true } OfficeOnlineServerInstall OOSInstall { Ensure = "Present" Path = "C:\OOSInstall\setup.exe" DependsOn = "[WindowsFeature]WebServer" } OfficeOnlineServerInstallLanguagePack FrenchLP { Ensure = "Present" BinaryDir = "C:\OOSLP\" Language = "fr-fr" DependsOn = "[OfficeOnlineServerInstall]OOSInstall" } OfficeOnlineServerFarm FarmConfig { InternalUrl = "http://localhost" AllowHttp = $true } } } OOS Start-DSCConfiguration OOS -Wait -Force -Verbose
Thanks, Nik!
But how do we patch Office Online Server farms or ensure update is installed?