Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. talkingmoose revised this gist Apr 22, 2024. No changes.
  2. talkingmoose revised this gist Apr 22, 2024. No changes.
  3. talkingmoose revised this gist Apr 22, 2024. No changes.
  4. talkingmoose revised this gist Apr 22, 2024. No changes.
  5. talkingmoose revised this gist Mar 12, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Download and Install Microsoft product.zsh
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@
    Originally posted: November 19, 2017
    Updated: February 13, 2023
    Updated: March 8, 2024
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
    @@ -68,7 +69,8 @@ linkID="" # e.g. "525133" for Office 2019
    # 868963 - Remote Desktop
    # 800050 - SharePoint Plugin download
    # 832978 - Skype for Business download
    # 869428 - Teams
    # 869428 - Teams Classic
    # 2249065 - New Teams
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download

  6. talkingmoose revised this gist Feb 13, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Download and Install Microsoft product.zsh
    Original file line number Diff line number Diff line change
    @@ -4,13 +4,13 @@
    -----------------------------------------------------------------------
    Written by:William Smith
    Professional Services Engineer
    Partner Program Manager
    Jamf
    bill@talkingmoose.net
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    https://gist.github.com/b6637160b65b751824943ede022daa17
    Originally posted: November 19, 2017
    Updated: January 20, 2020
    Updated: February 13, 2023
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
  7. talkingmoose revised this gist Feb 13, 2023. 2 changed files with 15 additions and 125 deletions.
    22 changes: 15 additions & 7 deletions Download and Install Microsoft product.zsh
    Original file line number Diff line number Diff line change
    @@ -41,13 +41,21 @@ linkID="" # e.g. "525133" for Office 2019
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 830196 - AutoUpdate download
    # 2069148 - Edge (Consumer Stable)
    # 2069439 - Edge (Consumer Beta)
    # 2069340 - Edge (Consumer Dev)
    # 2069147 - Edge (Consumer Canary)
    # 2093438 - Edge (Enterprise Stable)
    # 2093294 - Edge (Enterprise Beta)
    # 2093292 - Edge (Enterprise Dev)
    # 2069439 - Edge (Intel Consumer Beta)
    # 2069340 - Edge (Intel Consumer Dev)
    # 2069147 - Edge (Intel Consumer Canary)

    # These no longer work; unable to determine link IDs
    # XXXXXXX - Edge (Enterprise Stable)
    # XXXXXXX - Edge (Enterprise Beta)
    # XXXXXXX - Edge (Enterprise Dev)

    # Releases sourced from https://www.microsoft.com/en-us/edge/download?form=MA13FJ
    # 2069148 - Edge (Intel Consumer Stable)
    # 2093504 - Edge (Apple Silicon Stable)
    # 2069340 - Edge (Intel Dev)
    # 2099619 - Edge (Apple Silicon Dev)

    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 869655 - InTune Company Portal download
    118 changes: 0 additions & 118 deletions Download and Install Microsoft product.zsh.sh
    Original file line number Diff line number Diff line change
    @@ -1,118 +0,0 @@
    #!/bin/zsh

    :<<'ABOUT_THIS_SCRIPT'
    -----------------------------------------------------------------------
    Written by:William Smith
    Professional Services Engineer
    Jamf
    bill@talkingmoose.net
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: January 20, 2020
    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 optionally update the sha256Checksum
    value with a known SHA 256 string. Run the script with elevated
    privileges. If using Jamf Pro, consider replacing the linkID and
    sha256Checksum values with "$4" and "$5", entering the ID as script
    parameters 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
    # or leave blank if using a $4 script parameter with Jamf Pro

    linkID="" # e.g. "525133" for Office 2019

    # 525133 - Office 2019 for Mac SKUless download (aka Office 365)
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 830196 - AutoUpdate download
    # 2069148 - Edge (Consumer Stable)
    # 2069439 - Edge (Consumer Beta)
    # 2069340 - Edge (Consumer Dev)
    # 2069147 - Edge (Consumer Canary)
    # 2093438 - Edge (Enterprise Stable)
    # 2093294 - Edge (Enterprise Beta)
    # 2093292 - Edge (Enterprise Dev)
    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 869655 - InTune Company Portal download
    # 823060 - OneDrive download
    # 820886 - OneNote download
    # 525137 - Outlook 2019 SKUless download
    # 871753 - Outlook 2016 SKUless download
    # 525136 - PowerPoint 2019 SKUless download
    # 871751 - PowerPoint 2016 SKUless download
    # 868963 - Remote Desktop
    # 800050 - SharePoint Plugin download
    # 832978 - Skype for Business download
    # 869428 - Teams
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download

    # enter the SHA 256 checksum for the download file
    # download the package and run '/usr/bin/shasum -a 256 /path/to/file.pkg'
    # this will change with each version
    # leave blank to to skip the checksum verification (less secure) or if using a $5 script parameter with Jamf Pro

    sha256Checksum="" # e.g. "67b1e8e036c575782b1c9188dd48fa94d9eabcb81947c8632fd4acac7b01644b"

    if [ "$4" != "" ] && [ "$linkID" = "" ]
    then
    linkID=$4
    fi

    if [ "$5" != "" ] && [ "$sha256Checksum" = "" ]
    then
    sha256Checksum=$5
    fi

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"

    # create temporary working directory
    echo "Creating working directory '$tempDirectory'"
    workDirectory=$( /usr/bin/basename $0 )
    tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" )

    # change directory to temporary working directory
    echo "Changing directory to working directory '$tempDirectory'"
    cd "$tempDirectory"

    # download the installer package and name it for the linkID
    echo "Downloading package $linkID.pkg"
    /usr/bin/curl --location --silent "$url" -o "$linkID.pkg"

    # checksum the download
    downloadChecksum=$( /usr/bin/shasum -a 256 "$tempDirectory/$linkID.pkg" | /usr/bin/awk '{ print $1 }' )
    echo "Checksum for downloaded package: $downloadChecksum"

    # install the package if checksum validates
    if [ "$sha256Checksum" = "$downloadChecksum" ] || [ "$sha256Checksum" = "" ]; then
    echo "Checksum verified. Installing package $linkID.pkg"
    /usr/sbin/installer -pkg "$linkID.pkg" -target /
    exitCode=0
    else
    echo "Checksum failed. Recalculate the SHA 256 checksum and try again. Or download may not be valid."
    exitCode=1
    fi

    # remove the temporary working directory when done
    /bin/rm -Rf "$tempDirectory"
    echo "Deleting working directory '$tempDirectory' and its contents"

    exit $exitCode
  8. talkingmoose revised this gist Jan 20, 2020. 1 changed file with 118 additions and 0 deletions.
    118 changes: 118 additions & 0 deletions Download and Install Microsoft product.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,118 @@
    #!/bin/zsh

    :<<'ABOUT_THIS_SCRIPT'
    -----------------------------------------------------------------------
    Written by:William Smith
    Professional Services Engineer
    Jamf
    bill@talkingmoose.net
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: January 20, 2020
    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 optionally update the sha256Checksum
    value with a known SHA 256 string. Run the script with elevated
    privileges. If using Jamf Pro, consider replacing the linkID and
    sha256Checksum values with "$4" and "$5", entering the ID as script
    parameters 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
    # or leave blank if using a $4 script parameter with Jamf Pro

    linkID="" # e.g. "525133" for Office 2019

    # 525133 - Office 2019 for Mac SKUless download (aka Office 365)
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 830196 - AutoUpdate download
    # 2069148 - Edge (Consumer Stable)
    # 2069439 - Edge (Consumer Beta)
    # 2069340 - Edge (Consumer Dev)
    # 2069147 - Edge (Consumer Canary)
    # 2093438 - Edge (Enterprise Stable)
    # 2093294 - Edge (Enterprise Beta)
    # 2093292 - Edge (Enterprise Dev)
    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 869655 - InTune Company Portal download
    # 823060 - OneDrive download
    # 820886 - OneNote download
    # 525137 - Outlook 2019 SKUless download
    # 871753 - Outlook 2016 SKUless download
    # 525136 - PowerPoint 2019 SKUless download
    # 871751 - PowerPoint 2016 SKUless download
    # 868963 - Remote Desktop
    # 800050 - SharePoint Plugin download
    # 832978 - Skype for Business download
    # 869428 - Teams
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download

    # enter the SHA 256 checksum for the download file
    # download the package and run '/usr/bin/shasum -a 256 /path/to/file.pkg'
    # this will change with each version
    # leave blank to to skip the checksum verification (less secure) or if using a $5 script parameter with Jamf Pro

    sha256Checksum="" # e.g. "67b1e8e036c575782b1c9188dd48fa94d9eabcb81947c8632fd4acac7b01644b"

    if [ "$4" != "" ] && [ "$linkID" = "" ]
    then
    linkID=$4
    fi

    if [ "$5" != "" ] && [ "$sha256Checksum" = "" ]
    then
    sha256Checksum=$5
    fi

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"

    # create temporary working directory
    echo "Creating working directory '$tempDirectory'"
    workDirectory=$( /usr/bin/basename $0 )
    tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" )

    # change directory to temporary working directory
    echo "Changing directory to working directory '$tempDirectory'"
    cd "$tempDirectory"

    # download the installer package and name it for the linkID
    echo "Downloading package $linkID.pkg"
    /usr/bin/curl --location --silent "$url" -o "$linkID.pkg"

    # checksum the download
    downloadChecksum=$( /usr/bin/shasum -a 256 "$tempDirectory/$linkID.pkg" | /usr/bin/awk '{ print $1 }' )
    echo "Checksum for downloaded package: $downloadChecksum"

    # install the package if checksum validates
    if [ "$sha256Checksum" = "$downloadChecksum" ] || [ "$sha256Checksum" = "" ]; then
    echo "Checksum verified. Installing package $linkID.pkg"
    /usr/sbin/installer -pkg "$linkID.pkg" -target /
    exitCode=0
    else
    echo "Checksum failed. Recalculate the SHA 256 checksum and try again. Or download may not be valid."
    exitCode=1
    fi

    # remove the temporary working directory when done
    /bin/rm -Rf "$tempDirectory"
    echo "Deleting working directory '$tempDirectory' and its contents"

    exit $exitCode
  9. talkingmoose renamed this gist Jan 20, 2020. 1 changed file with 4 additions and 3 deletions.
    Original file line number Diff line number Diff line change
    @@ -97,15 +97,16 @@ cd "$tempDirectory"
    echo "Downloading package $linkID.pkg"
    /usr/bin/curl --location --silent "$url" -o "$linkID.pkg"

    # checksum and install the package
    # checksum the download
    downloadChecksum=$( /usr/bin/shasum -a 256 "$tempDirectory/$linkID.pkg" | /usr/bin/awk '{ print $1 }' )
    echo "Checksum for downloaded package: $downloadChecksum"

    # install the package if checksum validates
    if [ "$sha256Checksum" = "$downloadChecksum" ] || [ "$sha256Checksum" = "" ]; then
    echo "Checksum for downloaded package: $downloadChecksum"
    echo "Checksum verified. Installing package $linkID.pkg"
    /usr/sbin/installer -pkg "$linkID.pkg" -target /
    exitCode=0
    else
    echo "Checksum for downloaded package: $downloadChecksum"
    echo "Checksum failed. Recalculate the SHA 256 checksum and try again. Or download may not be valid."
    exitCode=1
    fi
  10. talkingmoose renamed this gist Jan 20, 2020. 1 changed file with 46 additions and 14 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/bash
    #!/bin/zsh

    <<ABOUT_THIS_SCRIPT
    :<<'ABOUT_THIS_SCRIPT'
    -----------------------------------------------------------------------
    Written by:William Smith
    @@ -10,17 +10,19 @@
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: January 18, 2020
    Updated: January 20, 2020
    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.
    Microsoft products in the list and optionally update the sha256Checksum
    value with a known SHA 256 string. Run the script with elevated
    privileges. If using Jamf Pro, consider replacing the linkID and
    sha256Checksum values with "$4" and "$5", entering the ID as script
    parameters in a policy.
    Except where otherwise noted, this work is licensed under
    http://creativecommons.org/licenses/by/4.0/
    @@ -62,24 +64,54 @@ linkID="" # e.g. "525133" for Office 2019
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download

    # enter the SHA 256 checksum for the download file
    # download the package and run '/usr/bin/shasum -a 256 /path/to/file.pkg'
    # this will change with each version
    # leave blank to to skip the checksum verification (less secure) or if using a $5 script parameter with Jamf Pro

    sha256Checksum="" # e.g. "67b1e8e036c575782b1c9188dd48fa94d9eabcb81947c8632fd4acac7b01644b"

    if [ "$4" != "" ] && [ "$linkID" = "" ]
    then
    linkID=$4
    fi

    if [ "$5" != "" ] && [ "$sha256Checksum" = "" ]
    then
    sha256Checksum=$5
    fi

    # 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/
    # create temporary working directory
    echo "Creating working directory '$tempDirectory'"
    workDirectory=$( /usr/bin/basename $0 )
    tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" )

    # change directory to temporary working directory
    echo "Changing directory to working directory '$tempDirectory'"
    cd "$tempDirectory"

    # download the installer package and name it for the linkID
    /usr/bin/curl -JL "$url" -o "$linkID.pkg"
    echo "Downloading package $linkID.pkg"
    /usr/bin/curl --location --silent "$url" -o "$linkID.pkg"

    # install the package
    /usr/sbin/installer -pkg "$linkID.pkg" -target /
    # checksum and install the package
    downloadChecksum=$( /usr/bin/shasum -a 256 "$tempDirectory/$linkID.pkg" | /usr/bin/awk '{ print $1 }' )
    if [ "$sha256Checksum" = "$downloadChecksum" ] || [ "$sha256Checksum" = "" ]; then
    echo "Checksum for downloaded package: $downloadChecksum"
    echo "Checksum verified. Installing package $linkID.pkg"
    /usr/sbin/installer -pkg "$linkID.pkg" -target /
    exitCode=0
    else
    echo "Checksum for downloaded package: $downloadChecksum"
    echo "Checksum failed. Recalculate the SHA 256 checksum and try again. Or download may not be valid."
    exitCode=1
    fi

    # remove the installer package when done
    /bin/rm -f "$linkID.pkg"
    # remove the temporary working directory when done
    /bin/rm -Rf "$tempDirectory"
    echo "Deleting working directory '$tempDirectory' and its contents"

    exit 0
    exit $exitCode
  11. talkingmoose revised this gist Jan 18, 2020. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: January 15, 2020
    Updated: January 18, 2020
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
    @@ -39,10 +39,13 @@ linkID="" # e.g. "525133" for Office 2019
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 830196 - AutoUpdate download
    # 2069148 - Edge (Stable)
    # 2069439 - Edge (Beta)
    # 2069340 - Edge (Dev)
    # 2069147 - Edge (Canary)
    # 2069148 - Edge (Consumer Stable)
    # 2069439 - Edge (Consumer Beta)
    # 2069340 - Edge (Consumer Dev)
    # 2069147 - Edge (Consumer Canary)
    # 2093438 - Edge (Enterprise Stable)
    # 2093294 - Edge (Enterprise Beta)
    # 2093292 - Edge (Enterprise Dev)
    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 869655 - InTune Company Portal download
  12. talkingmoose revised this gist Jan 15, 2020. 1 changed file with 14 additions and 10 deletions.
    24 changes: 14 additions & 10 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: December 19, 2018
    Updated: January 15, 2020
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
    @@ -38,22 +38,26 @@ linkID="" # e.g. "525133" for Office 2019
    # 525133 - Office 2019 for Mac SKUless download (aka Office 365)
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download
    # 830196 - AutoUpdate download
    # 2069148 - Edge (Stable)
    # 2069439 - Edge (Beta)
    # 2069340 - Edge (Dev)
    # 2069147 - Edge (Canary)
    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 525136 - PowerPoint 2019 SKUless download
    # 871751 - PowerPoint 2016 SKUless download
    # 869655 - InTune Company Portal download
    # 823060 - OneDrive download
    # 820886 - OneNote download
    # 525137 - Outlook 2019 SKUless download
    # 871753 - Outlook 2016 SKUless download
    # 820886 - OneNote download
    # 823060 - OneDrive download
    # 830196 - AutoUpdate download
    # 525136 - PowerPoint 2019 SKUless download
    # 871751 - PowerPoint 2016 SKUless download
    # 868963 - Remote Desktop
    # 800050 - SharePoint Plugin download
    # 832978 - Skype for Business download
    # 869655 - InTune Company Portal download
    # 868963 - Remote Desktop
    # 869428 - Teams
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download

    if [ "$4" != "" ] && [ "$linkID" = "" ]
    then
  13. talkingmoose revised this gist Dec 19, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ ABOUT_THIS_SCRIPT
    # enter the Microsoft fwlink (permalink) product ID
    # or leave blank if using a $4 script parameter with Jamf Pro

    linkID="" # e.g. "525133"" for Office 2019
    linkID="" # e.g. "525133" for Office 2019

    # 525133 - Office 2019 for Mac SKUless download (aka Office 365)
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    @@ -55,7 +55,7 @@ linkID="" # e.g. "525133"" for Office 2019
    # 868963 - Remote Desktop
    # 869428 - Teams

    if [ "$4" != "" ] && [ "$linkID" == "" ]
    if [ "$4" != "" ] && [ "$linkID" = "" ]
    then
    linkID=$4
    fi
  14. talkingmoose revised this gist Dec 19, 2018. 1 changed file with 27 additions and 13 deletions.
    40 changes: 27 additions & 13 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: March 27, 2018
    Updated: December 19, 2018
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
    @@ -31,20 +31,34 @@
    ABOUT_THIS_SCRIPT

    # enter the Microsoft fwlink (permalink) product ID
    linkID="830196" # AutoUpdate SKUless download
    # or leave blank if using a $4 script parameter with Jamf Pro

    # 525133 - Office for Mac SKUless download for Office 365 or 2019
    # 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
    # 862280 - InTune Company Portal download
    linkID="" # e.g. "525133"" for Office 2019

    # 525133 - Office 2019 for Mac SKUless download (aka Office 365)
    # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams)
    # 871743 - Office 2016 for Mac SKUless download
    # 525134 - Word 2019 SKUless download
    # 871748 - Word 2016 SKUless download
    # 525135 - Excel 2019 SKUless download
    # 871750 - Excel 2016 SKUless download
    # 525136 - PowerPoint 2019 SKUless download
    # 871751 - PowerPoint 2016 SKUless download
    # 525137 - Outlook 2019 SKUless download
    # 871753 - Outlook 2016 SKUless download
    # 820886 - OneNote download
    # 823060 - OneDrive download
    # 830196 - AutoUpdate download
    # 800050 - SharePoint Plugin download
    # 832978 - Skype for Business download
    # 869655 - InTune Company Portal download
    # 868963 - Remote Desktop
    # 869428 - Teams

    if [ "$4" != "" ] && [ "$linkID" == "" ]
    then
    linkID=$4
    fi

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"
  15. talkingmoose revised this gist Sep 12, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ ABOUT_THIS_SCRIPT
    # enter the Microsoft fwlink (permalink) product ID
    linkID="830196" # AutoUpdate SKUless download

    # 525133 - Office 2016 for Mac SKUless download
    # 525133 - Office for Mac SKUless download for Office 365 or 2019
    # 525134 - Word SKUless download
    # 525135 - Excel SKUless download
    # 525136 - PowerPoint SKUless download
  16. talkingmoose revised this gist Mar 27, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Updated: November 24, 2017
    Updated: March 27, 2018
    Purpose: Downloads and installs the latest available Microsoft
    product specified directly on the client. This avoids having to
    @@ -44,6 +44,7 @@ linkID="830196" # AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business SKUless download
    # 862280 - InTune Company Portal download
    # 868963 - Remote Desktop

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"
  17. talkingmoose revised this gist Dec 15, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -43,6 +43,7 @@ linkID="830196" # AutoUpdate SKUless download
    # 830196 - AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business SKUless download
    # 862280 - InTune Company Portal download

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"
  18. talkingmoose revised this gist Nov 28, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@
    ABOUT_THIS_SCRIPT

    # enter the Microsoft fwlink (permalink) product ID
    linkID="525133" # AutoUpdate SKUless download
    linkID="830196" # AutoUpdate SKUless download

    # 525133 - Office 2016 for Mac SKUless download
    # 525134 - Word SKUless download
  19. talkingmoose revised this gist Nov 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@ linkID="525133" # AutoUpdate 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
    # 832978 - Skype for Business SKUless download

    # this is the full fwlink URL
    url="https://go.microsoft.com/fwlink/?linkid=$linkID"
  20. talkingmoose revised this gist Nov 24, 2017. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@
    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
    @@ -30,7 +31,7 @@
    ABOUT_THIS_SCRIPT

    # enter the Microsoft fwlink (permalink) product ID
    linkID="830196" # AutoUpdate SKUless download
    linkID="525133" # AutoUpdate SKUless download

    # 525133 - Office 2016 for Mac SKUless download
    # 525134 - Word SKUless download
    @@ -49,13 +50,13 @@ 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 get the file name
    fileName=$( /usr/bin/curl -JLO "$url" | /usr/bin/awk -F "'" '{ print $2 }' )
    # 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 $fileName -target /
    /usr/sbin/installer -pkg "$linkID.pkg" -target /

    # remove the installer package when done
    /bin/rm -f "$fileName"
    /bin/rm -f "$linkID.pkg"

    exit 0
  21. talkingmoose revised this gist Nov 22, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@ linkID="830196" # AutoUpdate SKUless download
    # 823060 - OneDrive SKUless download
    # 830196 - AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business 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"
  22. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,9 @@
    Originally posted: November 19, 2017
    Purpose: Downloads and installs the latest available Microsoft
    product specified. This avoids having to manually download and store
    an up-to-date installer on a distribution server every month.
    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
  23. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -11,13 +11,14 @@
    Originally posted: November 19, 2017
    Purpose: Downlaods and installs the latest available Microsoft
    Purpose: Downloads and installs the latest available Microsoft
    product specified. This avoids having to manually download and store
    an up-to-date installer on a distribution server every month. 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.
    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/
  24. talkingmoose revised this gist Nov 19, 2017. No changes.
  25. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -41,12 +41,12 @@ linkID="830196" # AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business SKUless download

    # change directory to /private/tmp to make this the working directory
    cd /private/tmp/

    # 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 get the file name
    fileName=$( /usr/bin/curl -JLO "$url" | /usr/bin/awk -F "'" '{ print $2 }' )

  26. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@
    -----------------------------------------------------------------------
    ABOUT_THIS_SCRIPT

    # enter the Microsoft fwlink (permalink) for the product
    # enter the Microsoft fwlink (permalink) product ID
    linkID="830196" # AutoUpdate SKUless download

    # 525133 - Office 2016 for Mac SKUless download
  27. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions Download and Install Microsoft product.sh
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@
    product specified. This avoids having to manually download and store
    an up-to-date installer on a distribution server every month. Update
    the linkID value to one of the corresponding Microsoft products in
    the list and run th script with elevated privileges. If using Jamf
    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.
    @@ -41,8 +41,6 @@ linkID="830196" # AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business SKUless download

    # if using Jamf Pro, consider replacing the linkID value with "$4" and entering the ID as a script parameter

    # change directory to /private/tmp to make this the working directory
    cd /private/tmp/

  28. talkingmoose renamed this gist Nov 19, 2017. 1 changed file with 0 additions and 0 deletions.
  29. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 27 additions and 0 deletions.
    27 changes: 27 additions & 0 deletions Download and Install Microsoft app.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,32 @@
    #!/bin/bash

    <<ABOUT_THIS_SCRIPT
    -----------------------------------------------------------------------
    Written by:William Smith
    Professional Services Engineer
    Jamf
    bill@talkingmoose.net
    https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a
    Originally posted: November 19, 2017
    Purpose: Downlaods and installs the latest available Microsoft
    product specified. This avoids having to manually download and store
    an up-to-date installer on a distribution server every month. Update
    the linkID value to one of the corresponding Microsoft products in
    the list and run th 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) for the product
    linkID="830196" # AutoUpdate SKUless download

  30. talkingmoose revised this gist Nov 19, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Download and Install Microsoft app.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ linkID="830196" # AutoUpdate SKUless download
    # 800050 - SharePoint Plugin SKUless download
    # 832978 - Skype for Business SKUless download

    # if using Jamf Pro, consider replacing the linkID with "$4" and entering the ID as a script parameter
    # if using Jamf Pro, consider replacing the linkID value with "$4" and entering the ID as a script parameter

    # change directory to /private/tmp to make this the working directory
    cd /private/tmp/