For full instructions and documentation, visit my site.
Please consider donating to support my work:
Office Update Utility can also be downloaded from:
Tweet me if you have questions: @mikegalvin_
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.
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.
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.
Here’s a list of all the command line switches 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 firstname.lastname@example.org|
|-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 email@example.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|
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.
2020-03-03: Version 2020.03.01 ‘Crosshair’
- 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.
- Added custom subject line for e-mail.
- Initial release.