Recreate OfficeWebApps Farm when patching/upgrading

By | 2016-12-20

A powerful, yet easy solution to simplify the process of recreating the OfficeWebApps Farm after an upgrade. As mentioned in the article from Microsoft Technet, when you want to apply a patch and/or upgrade to the OfficeWebApps software, you need to remove the OfficeWebApps Machine (Remove-OfficeWebAppsMachine) prior to the upgrade and recreate the Farm (New-OfficeWebAppsFarm) afterwords.
This seems a bit uneasy, because you need to get every parameter of the current Farm (Get-OfficeWebAppsFarm). Also you need to do this every time you update to the latest ServicePack or Cumulative Update.

This solution automates that part, by writing the current config to CSV and loading it in to recreate the Farm with exactly the same config.


The first part is just plain and simple, export the config to CSV, don’t forget any Host config (allowed domains), than remove the OfficeWebApps Machine.

The next part recreates the OfficeWebApps Farm based on the CSV, which checks the parameters of the “New-OfficeWebAppsFarm” and converts booleans from the CSV where needed.

By using a hashtable for the parameters, it is easy to use it with the “New-OfficeWebAppsFarm” command. This technique (using a ‘@’ in front of the hashtable variable) is called splatting, check this blog for more on that.


Happing upgrading!


Leave a Reply

Your email address will not be published. Required fields are marked *