• Stars
    star
    379
  • Rank 113,004 (Top 3 %)
  • Language
    PowerShell
  • License
    MIT License
  • Created about 6 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create evergreen Windows image build pipelines with the latest version numbers and download URLs for common applications

About

License PowerShell Gallery Version PowerShell Gallery codecov

Evergreen icon

Evergreen is a simple PowerShell module to return the latest version and download URLs for a set of common enterprise Windows applications. The module consists of a number of simple functions to use in scripts when performing several tasks including:

  • Image creation with Hashicorp Packer - images can be created with the latest version of a set of applications
  • Import applications into Microsoft Endpoint Manager - keep Configuration Manager or Microsoft Intune up to date with the latest versions of applications
  • Validating or auditing a desktop image to ensure the current version of an application is installed
  • Create a library of application installers - by regularly running Evergreen functions, you can retrieve and download the current version of an application and store it in an application directory structure for later use
  • Track application updates to stay on top of new releases
  • Submitting manifests to Winget or Chocolatey or similar - Evergreen can return an object with a version number and download URL that can be used to construct manifests for the most recent versions

Via Get-EvergreenApp each Evergreen application returns at least two properties in the object sent to the pipeline:

  • Version - a string property that is the version number of the application. If you need these in a version format, cast them with [System.Version]
  • URI - a string property that is the download location for the latest version of the application. These will be publicly available locations that provide installers in typically Windows installer formats, e.g., exe, msi. Some downloads may be in other formats, such as zip that will need to be extracted before install

How Evergreen Works

Application version and download links are only pulled from official sources (vendor's web site, vendor's application update API, GitHub, SourceForge etc.) and never a third party.

Evergreen uses an approach that returns at least the version number and download URI for applications programmatically - thus for each run an Evergreen function it should return the latest version and download link.

Evergreen uses several strategies to return the latest version of software:

  1. Application update APIs - by using the same approach as the application itself, Evergreen can consistently return the latest version number and download URI - e.g., Microsoft Edge, Mozilla Firefox or Microsoft OneDrive. Fiddler can often be used to find where an application queries for updates
  2. Repository APIs - repo hosts including GitHub and SourceForge have APIs that can be queried to return application version and download links - e.g., Audacity, Notepad++ or WinMerge
  3. Web page queries - often a vendor download pages will include a query that returns JSON when listing versions and download links - this avoids page scraping. Evergreen can mimic this approach to return application download URLs; however, this approach is likely to fail if the vendor changes how their pages work - e.g., Adobe Acrobat Reader DC
  4. Static URLs - some vendors provide static or evergreen URLs to their application installers. These URLs often provide additional information in the URL that can be used to determine the application version and can be resolved to the actual target URL - e.g., Microsoft FSLogix Apps or Zoom

What Evergreen Doesn't Do

Evergreen does not scrape HTML - scraping web pages to parse text and determine version strings and download URLs can be problematic when text in the page changes or the page is out of date. Pull requests that use web page scraping will be closed.

While the use of RegEx to determine application properties (particularly version numbers) is used for some applications, this approach is not preferred, if possible.

For additional applications where the only recourse it to use web page scraping, see the Nevergreen project.

Why

There are several community and commercial products that manage application deployment and updates already. This module isn't intended to compete against those. In fact, they can be complementary - for example, Evergreen can be used with the Chocolatey Automatic Package Updater Module to find the latest version of an application and then creating and submitting a Chocolatey package, or it can be used to create a Windows Package Manager manifest (see a sample script here: New-WinGetManifest.ps1).

Evergreen's focus is on integration for PowerShell scripts to provide product version numbers and download URLs. Ideal for use with the Microsoft Deployment Toolkit or Microsoft Endpoint Configuration Manager for operating system deployment, creating applications packages in Microsoft Intune, or with Packer to create evergreen machine images in Azure or AWS.

Documentation

Documentation for Evergreen, including usage examples, is located here: https://stealthpuppy.com/evergreen/.

Versioning

The module uses a version notation that follows: YearMonth.Build. It is expected that the module will have changes on a regular basis, so the version numbering is intended to make it as simple as possible to understand when the last update was made. See the CHANGELOG for details on changes introduced in each version.

Installing the Module

PowerShell Support

Evergreen supports Windows PowerShell 5.1 and PowerShell 7.0+. Evergreen should work on PowerShell Core 6.x; however, we are not actively testing on that version of PowerShell, so support cannot be guaranteed.

Install from the PowerShell Gallery

The Evergreen module is published to the PowerShell Gallery and can be found here: Evergreen. This is the best and recommend method to install Evergreen.

The module can be installed from the gallery with:

Install-Module -Name Evergreen
Import-Module -Name Evergreen

Updating the Module

If you have installed a previous version of the module from the gallery, you can install the latest update with Update-Module and the -Force parameter:

Update-Module -Name Evergreen -Force

Manual Installation from the Repository

The module can be downloaded from the GitHub source repository and includes the module in the Evergreen folder. The folder needs to be installed into one of your PowerShell Module Paths. To see the full list of available PowerShell Module paths, use $env:PSModulePath.split(';') in a PowerShell console.

Common PowerShell module paths include:

  • Current User: %USERPROFILE%\Documents\WindowsPowerShell\Modules\
  • All Users: %ProgramFiles%\WindowsPowerShell\Modules\
  • OneDrive: $env:OneDrive\Documents\WindowsPowerShell\Modules\

To install from the repository

  1. Download the main branch to your workstation
  2. Copy the contents of the Evergreen folder onto your workstation into the desired PowerShell Module path
  3. Open a Powershell console with the Run as Administrator option
  4. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass
  5. Unblock the files with Get-ChildItem -Path <path to module> -Recurse | Unblock-File

Once installation is complete, you can validate that the module exists by running Get-Module -ListAvailable Evergreen. To use the module, load it with:

Import-Module -Name Evergreen

Greentech icon by Icons8

More Repositories

1

intune

Scripts and tools for use with Microsoft Intune
PowerShell
254
star
2

vcredist

Lifecycle management for the Microsoft Visual C++ Redistributables
PowerShell
131
star
3

image-customise

Make Windows 10/11, Windows Server enterprise ready with OS and default user profile customisations and optimisations. Support Windows PCs and VDI
PowerShell
95
star
4

fslogix

Scripts for use with FSLogix Apps, Containers etc.
PowerShell
92
star
5

LatestUpdate

A module to retrieve and download Windows 10 current updates from the Microsoft Update Catalog
PowerShell
85
star
6

packagefactory

A packaging factory for Microsoft Intune using Evergreen, VcRedist, and IntuneWin32App
PowerShell
63
star
7

remediations

PowerShell scripts for use with Remediations in Microsoft Intune
PowerShell
41
star
8

intune-backup-template

Backup and document a Microsoft Intune tenant with GitHub workflows or Azure Pipelines
CSS
40
star
9

packer

Build images with Hashicorp Packer
PowerShell
24
star
10

azure

Build an Azure environment with various tools - ARM templates, Bicep etc.
PowerShell
14
star
11

Infrastructure

Various scripts and tools for managing infrastructure roles
PowerShell
14
star
12

AppLocker

AppLocker baseline configuration with the AaronLocker module. Used for testing with Windows 10, Intune etc.
PowerShell
14
star
13

entra-export-template

Workflows for scheduled export of settings from an Azure AD tenant
PowerShell
12
star
14

apptracker

Uses Evergreen to query for application version updates and store the result in JSON. Generates the App Tracker site every 12 hours.
PowerShell
10
star
15

automata

Project Automata - a standardised Microsoft Deployment Toolkit environment
PowerShell
9
star
16

m365apps

PowerShell script and workflow for creating and importing a Win32 package into Intune for the Microsoft 365 Apps
VBScript
9
star
17

secure-shares

Scripts to configure secure permissions on shares for folder redirection and home drives etc.
PowerShell
9
star
18

XenDesktop

Scripts for automating the deployment and configuration of Citrix XenDesktop
PowerShell
6
star
19

intune-apps

Manage Windows, macOS, Android, iOS apps in Microsoft Intune
PowerShell
6
star
20

w365

Build an image for Windows 365 (or other VDI solutions) with core apps
PowerShell
6
star
21

m365apps-template

Workflows for building a Microsoft 365 Apps package and importing into Intune in Win32 format
VBScript
5
star
22

build

Windows image build scripts
PowerShell
4
star
23

msix

Use Evergreen to automatically package applications into MSIX and MSIX app attach format
PowerShell
4
star
24

aaronparker

About
3
star
25

nerdio-actions

PowerShell scripts for integration with Scripted Actions in Nerdio Manager
PowerShell
3
star
26

AppV

Scripts and functions for Microsoft Application Virtualization
PowerShell
3
star
27

intune-backup-azure

Backup and document a Microsoft Intune tenant with Azure Pipelines
CSS
3
star
28

ubuntu

Ubuntu autoinstall files
3
star
29

terraform

Build an Azure environment with Hashicorp Terraform
HCL
2
star
30

aws

Build an AWS environment with various tools
PowerShell
2
star
31

EvergreenLibrary

An Evergreen Library sample repository
2
star
32

evergreen-api

Evergreen as an API running on Cloudflare Workers
JavaScript
2
star
33

binaries

Installers for desktop builds
PowerShell
1
star
34

aaronparker.github.io

stealthpuppy.com content
HTML
1
star
35

vdi-uat

Automated testing of VDI images with Pester, Evergreen and Azure Pipelines
PowerShell
1
star