Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

Update Edge source files in MEMCM using PowerShell

Posted on March 9, 2021March 9, 2021 by Jörgen Nilsson

Edge is updated often and if we use AutoUpdate which I think we should use for Edge it is automatically updated after OS deployment. But in some cases, we need policies to be applied to Edge that are only supported in newer versions then we need to make sure it is updated when the user logs on.

I found this great PowerShell module “Evergreen” https://www.powershellgallery.com/packages/Evergreen written by Aaron Parker; Bronson Magnan; Trond Eric Haarvarstein. Which makes this task easy as we can use that module to check the latest version, get download paths and so on. I have used to send emails when new versions are being published so a ticket is being created in our helpdesk system. Be sure to check it out!

Sample script dialog

The script can be downloaded from Github here: PowerShell/UpdateEdgeSourceFiles at master · Ccmexec/PowerShell · GitHub

The script will do the following:

  • Install/Update the Evergreen module
  • Check if a new version of Edge (stable) is available
  • Download the latest version if needed to a staging folder
  • Copy the EdgeEnterprise.MSI to the source folder configured in the script
  • Update the Source files on Distribution Points

In this setup I used the wizard in MEMCM to create the Edge application, the detection method created by the wizard uses the “Greater than or equal to” Operator so it will still work just fine even after we updated the Source files.

Detection Method example

The script can be run as a schedule task on a server/computer, it needs the Configuration Manager console installed or cmdlets. 

Before using the script, the following lines needs to be adjusted to your environment.

Script parameters

$CMEdgeAppName = The name of the Edge application that should be updated.
$CMAPPDeploymentType = The Deployment type Edge that should be updated.
$TempPath = Path to staging folder where the new .MSI will be downloaded to.
$TargetPath= the path to the source files for Edge
$VersionsToKeep = how many versions of Edge should be saved in the Staging folder.

The script will create the staging folder, in this example “D:\staging”. It can also be configured to keep x number of versions if for some reasons a rollback is needed, after that it will start deleting the oldest one.

Staging folder content

It also creates a log file that can be used to troubleshoot if something went wrong when running the script.

Log file sample

I hope this can be useful!

  • Edge
  • Powershell
  • Update Edge
  • 1 thought on “Update Edge source files in MEMCM using PowerShell”

    1. Pingback: Microsoft Cloud ve Datacenter Management Mart 2021 Bülten – Sertaç Topal

    Leave a Reply Cancel 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.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT