Office Update Utility

Office Update Manager for 365/2019

Office Update Utility can also be downloaded from:

Please consider supporting my work:

  • Sign up using Patreon.
  • Support with a one-time payment using PayPal.

If you’d like to get in touch with me please leave a comment, send me a tweet or DM, or send me a message via my contact form.

-Mike

Features and Requirements

  • This utility will check for and download update files for Office 365 and Office 2019.
  • It can be configured to remove old update files.
  • It can be configured to create and e-mail a log file.
  • The utility requires the Office Deployment Tool a free download available here.
  • The utility requires at least PowerShell 5.0.
  • This utility has been tested on Windows 10, Windows Server 2016 and Windows Server 2019 and updating Office 2019 and 365 installations.

 

Folder Structure

This utility requires a specific folder structure in order to operate, it expects the Office Deployment Tool and the configuration xml file to be in the same folder. Additionally, the source path of the Office installation files in the configuration xml file should be set to the same location. For example:

  • Office Deployment Tool location: \\server\share\Office-365-x64\setup.exe
  • Configuration xml file location: \\server\share\Office-365-x64\config-2019-x64.xml
  • Source path in the configuration xml file: \\server\share\Office-365-x64

This configuration will result in the Office update files being downloaded and stored in: \\server\share\Office-2019-x64\Office\Data.

 

Generating A Password File

The password used for SMTP server authentication must be in an encrypted text file. To generate the password file, run the following command in PowerShell on the computer and logged in with the user that will be running the utility. When you run the command, you will be prompted for a username and password. Enter the username and password you want to use to authenticate to your SMTP server.

Please note: This is only required if you need to authenticate to the SMTP server when send the log via e-mail.

$creds = Get-Credential
$creds.Password | ConvertFrom-SecureString | Set-Content c:\scripts\ps-script-pwd.txt

After running the commands, you will have a text file containing the encrypted password. When configuring the -Pwd switch enter the path and file name of this file.

 

Configuration

The table below shows all the command line options available with descriptions and example configurations.

Command Line Switch Description Example
-Office The folder containing the Office Deployment Tool (ODT). \\server\share\office-365-x64\setup.exe
-Config The name of the configuration xml file for the Office ODT. It must be located in the same folder as the ODT. config-365-x64.xml
-Days The number of days that you wish to keep old update files for. If you do not configure this option, no old files will be removed. 30
-NoBanner Use this option to hide the ASCII art title in the console. N/A
-L The path to output the log file to. The file name will be Office_Update_YYYY-MM-dd_HH-mm-ss.log. Do not add a trailing \ backslash. C:\scripts\logs
-Subject The subject line for the e-mail log. Encapsulate with single or double quotes. If no subject is specified, the default of “Office Update Utility Log” will be used. ‘Server: Notification’
-SendTo The e-mail address the log should be sent to. me@contoso.com
-From The e-mail address the log should be sent from. OffUpdate@contoso.com
-Smtp The DNS name or IP address of the SMTP server. smtp.live.com OR smtp.office365.com
-User The user account to authenticate to the SMTP server. example@contoso.com
-Pwd The txt file containing the encrypted password for SMTP authentication. C:\scripts\ps-script-pwd.txt
-UseSsl Configures the utility to connect to the SMTP server using SSL. N/A

 

Example

Office-Update.ps1 -Office \\Apps01\Software\Office365 -Config config-365-x64.xml
-Days 30 -L C:\scripts\logs -Subject 'Server: Office Update'
-SendTo me@contoso.com -From OffUpdate@contoso.com
-Smtp smtp.outlook.com -User me@contoso.com -Pwd P@ssw0rd -UseSsl

The above command will download any Office updates for the version and channel configured in config-365-x64.xml to the Office files directory \\Apps01\Software\Office365. Any update files older than 30 days will be removed. If the download is successful the log file will be output to C:\scripts\logs and e-mailed with a custom subject line.

 

Change Log

2020-03-03: Version 2020.03.01 ‘Crosshair’

New features:

  • Refactored code.
  • Fully backwards compatible.
  • Added ASCII banner art when run in the console.
  • Added option to disable the ASCII banner art.
  • Config report matches design of Image Factory Utility.

2019-09-04 v1.1

  • Added custom subject line for e-mail.

2019-06-16 v1.0

  • Initial release.

One thought on “Office Update Utility

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: