Download and install latest Office 365 via Office Deployment Tool (ODT)

Inspired by Trond Eric Haavarstein’s evergreen PowerShell setup scripts, I created a download and install script for Office 365 Deployment Tool (ODT).

PowerShell

Microsoft Office 365 is the new standard in the EUC space right now. To honor this, we need a fast and reliable way to install it with our favorite deployment tools like MDT or PDQ,  for example when you rebuild your master images.

There are a few different ways to deploy Office 365, but they are all similar:

  • You need the Office 365 Click-to-run setup.exe (Office Deployment Tool (ODT))
  • You need a XML configuration file
  • You decide to deploy from a pre-build offline cache or the files are downloaded from Microsoft each and every time

And then you go: setup.exe /configure configuration.xml

Pretty straight forward you think, but non the less I had problems with this approach. And this is due to the fact, that the Office Deployment Tool itself gets updated pretty often. And this breaks your unattended deployments sooner or later, as the setup.exe stops working.

To solve this issue, I developed a PowerShell script together with Trond Eric Haavarstein, that checks the version of the Office Deployment Tool each time it’s executed. If a new version is available, it gets download and will be used immediately. If the file is already up-to-date, the download will be skipped. You will need to supply your own configuration XML file, and then you are ready to go.
Important: With the release of Office 2019, the MSI based setup was replaced by the Click2run setup trough the Office Deployment Tool (ODT), so this Blog post and script are equally valid for Office 2019, except you need a slightly different XML file. Keep this in mind.
If you don’t have a configuration XML file, there is an example file in my GitHub Repository, or check out the Office Customization Tool.

The latest version of this script can always be found over at my GitHub repository, check it out:
https://github.com/xenadmin/applications

Author: Marco

Marco is an IT-System administrator and IT-Consultant with 10+ years experience. He is specialized in the delivery of virtual Apps and Desktops with Citrix solutions. In 2017 he has been awarded Citrix Technology Advocate by Citrix for his community work (#CTA). His second core area is availability & performance monitoring with Zabbix, a leading open-source solution. His employer is the German IT-Company ANAXCO, which is developing a Transport Management Software (TMS) based on Microsoft Dynamics AX. More about Marco

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.