Last active
July 29, 2025 23:30
-
-
Save talkingmoose/a16ca849416ce5ce89316bacd75fc91a to your computer and use it in GitHub Desktop.
**Download the latest version of this script from: https://gist.github.com/b6637160b65b751824943ede022daa17 .** Downloads and installs the latest available Microsoft product specified directly on the client. This avoids having to manually download and store an up-to-date installer on a distribution server every month.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
<<ABOUT_THIS_SCRIPT | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
[email protected] | |
https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a | |
Originally posted: November 19, 2017 | |
Updated: November 24, 2017 | |
Purpose: Downloads and installs the latest available Microsoft | |
product specified directly on the client. This avoids having to | |
manually download and store an up-to-date installer on a | |
distribution server every month. | |
Instructions: Update the linkID value to one of the corresponding | |
Microsoft products in the list and run the script with elevated | |
privileges. If using Jamf Pro, consider replacing the linkID value | |
with "$4" and entering the ID as a script parameter in a policy. | |
Except where otherwise noted, this work is licensed under | |
http://creativecommons.org/licenses/by/4.0/ | |
"You say goodbye and I say exit 0." | |
----------------------------------------------------------------------- | |
ABOUT_THIS_SCRIPT | |
# enter the Microsoft fwlink (permalink) product ID | |
linkID="525133" # AutoUpdate SKUless download | |
# 525133 - Office 2016 for Mac SKUless download | |
# 525134 - Word SKUless download | |
# 525135 - Excel SKUless download | |
# 525136 - PowerPoint SKUless download | |
# 525137 - Outlook SKUless download | |
# 820886 - OneNote SKUless download | |
# 823060 - OneDrive SKUless download | |
# 830196 - AutoUpdate SKUless download | |
# 800050 - SharePoint Plugin SKUless download | |
# 832978 - Skype for Business SKUless download - Note: Doesn't currently work. Investigating | |
# this is the full fwlink URL | |
url="https://go.microsoft.com/fwlink/?linkid=$linkID" | |
# change directory to /private/tmp to make this the working directory | |
cd /private/tmp/ | |
# download the installer package and name it for the linkID | |
/usr/bin/curl -JL "$url" -o "$linkID.pkg" | |
# install the package | |
/usr/sbin/installer -pkg "$linkID.pkg" -target / | |
# remove the installer package when done | |
/bin/rm -f "$linkID.pkg" | |
exit 0 |
Comments are disabled for this gist.