Chocolatey Community Coffee Break

Join the Chocolatey Team on our regular monthly stream where we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Announcing Chocolatey Central Management 0.10.0

Livestream from
Thursday, 06 October 2022

We recently released our largest update to Chocolatey Central Management so far. Join Gary and Steph to find out more about Chocolatey Central Management and the new features and fixes we've added to this release.

Watch On-Demand
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand
Chocolatey Product Spotlight: Chocolatey 1.2.0 and Chocolatey Licensed Extension 5.0.0

Livestream from
Thursday, 03 November 2022

Join Paul and Gary for this months Chocolatey product livestream where we look at the latest release of Chocolatey 1.2.0, Chocolatey Licensed Extension 5.0.0 and shine a spotlight on the new hook scripts functionality. This opens up so many possibilities for Chocolatey CLI users!

Watch On-Demand
Chocolatey Coding Livestream

Livestream from
Tuesday, 29 November 2022

Join Josh as he adds the ability to manage Chocolatey GUI config and features with the Chocolatey Ansible Collection.

Watch On-Demand
Introduction into Chocolatey with Veeam

Webinar from
Tuesday, 13 December 2022

Join Gary, Paul, and Maurice as they introduce and demonstrate how to use Chocolatey! Questions will be answered live in an Ask Me Anything format.

Watch On-Demand



Downloads of v 0.1:


Last Update:

17 Oct 2022

Package Maintainer(s):

Software Author(s):

  • Teknowledgist


largh latest release GitHub update version AU powershell module FOSS

Latest Release on GitHub Helper

  • 1
  • 2
  • 3

0.1 | Updated: 17 Oct 2022



Downloads of v 0.1:



Software Author(s):

  • Teknowledgist

Latest Release on GitHub Helper 0.1

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests

Validation Testing Passed

Verification Testing Passed


Scan Testing Successful:

No detections found in any package files

Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Latest Release on GitHub Helper, run the following command from the command line or from PowerShell:


To upgrade Latest Release on GitHub Helper, run the following command from the command line or from PowerShell:


To uninstall Latest Release on GitHub Helper, run the following command from the command line or from PowerShell:


Deployment Method:


This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to

2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade largh -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade largh -y --source="'INTERNAL REPO URL'" 

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Install largh
    name: largh
    version: '0.1'
    state: present

See docs at

chocolatey_package 'largh' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '0.1'

See docs at

cChocoPackageInstaller largh
    Name     = "largh"
    Version  = "0.1"
    Source   = "INTERNAL REPO URL"

Requires cChoco DSC Resource. See docs at

package { 'largh':
  ensure   => '0.1',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',

Requires Puppet Chocolatey Provider module. See docs at

4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved by moderator TheCakeIsNaOH on 08 Nov 2022.


Are you a Chocolatey package maintainer for software released on GitHub? Have you noticed that GitHub has made it increasingly difficult to scrape pages for information on the latest release?

The Latest Release on GitHub Helper can help you!

Maybe you use AU or maybe you have another process for updating your packages. Regardless, you no longer need to parse raw HTML to nab the version or to snag the URL for the download. This package gives you a PowerShell function that leverages the GitHub API so that you to easily check for the latest version of any (public) project. It can be as simple as:

$Release = Get-LatestReleaseOnGitHub -URL
$version = $Release.Tag.trim('v.')
$URL = $Release.Assets | Where-Object {$_.FileName -match '\.exe'} | Select-Object -ExpandProperty DownloadURL

The $Release object will contain the name of the latest release, the principle tag (which usually contains the version), the description, the URLs for the "zipball" and "tarball" of the release code, and finally, information on each of the "assets" (i.e. files) for the release like the filename, date, size and full download URL.

Sure, you can do this yourself by installing the PowerShellForGitHub module and reading the documentation, but that's overkill for what you need to do. Install this package and keep it simple. It even has a shortened alias:


Note for maintainers with LOTS of packages

The GitHub API has a speed limit of 60 queries per hour. If you have so many packages or check for updates so often that you might exceed that limit, you can create an Access Token. The Token needs no special scope or permissions and will allow you to make up to 5000 queries per hour. (Surely that is enough!) This package allows you to provide the token as a one-time thing (less safe), or have it cached so you only need to provide it once on each computer you use.

  • Get-LARGH -URL -AccessToken a1b2c3d4e5f6g7h8i9j0
    This will use the token just one time. Other than a quick test, this is not particularly helpful unless you are going to put your access token in plaintext in your code (not a good idea!), but you do things your way.

  • Get-LARGH -URL -Credential
    This will request the token in a credential window and then store it encrypted within the user profile. All future uses of the function will use the cached credential without needing the switch until the -credential switch is used again and an empty/blank password is provided.


  • PowerShell v3

   Gathers info on the latest release of a project on GitHub
   GitHub has made it very difficult to scrape their web pages for information
   about a project.  They do have a comprehensive API however.  This script 
   API calls to collect information about the latest release of a project.  In
   particular, it gathers the tag (typically containing the version), the 
   description and the name, date, size, and download URL of all the assets
   for the release.
   The API does have a "speed limit" of 60 queries per hour.  In most, expected 
   use-cases for this script (primarily for Chocolatey Automatic Update packages), 
   users won't come close to that limit.  If the limit is a concern, this 
   script can accept, collect and cache (encrypted), or read a cached API Key 
   ("Personal Access Token":
   to increase the limit to 5000 queries per hour.

.Parameter URL
   (Required) The URL to the GitHub repository in the form: "https://[www.]<owner>/<repo>
.Parameter AccessToken
   The actual API Key as a plaintext string.  This is not a recommended option,
   but if the API Key is needed and available as plain text this is how to provide
   Default Value: <none>
.Parameter Credential
   Script will open a credential request window to collect the API Key in the 
   password field (while ignoring any value provided in the username field).
   The value will be cached as an secure string for future use.
   Default value: $false
   A custom object containing the release name, release tag (typically, the 
   version), the description and all the asset values of name, date, size, and 
   download URL for the release.  
   Get-LatestReleaseInfo -URL ''
   Information for the latest release of PDFSam will be collected and returned.
   If an encrypted personal access token is found in the user profile, it will 
   be used to authenticate to GitHub.  If one is not found, the information will 
   still be collected unless there have been more than 60 previous queries 
   within the hour.
   Get-LatestReleaseInfo -URL '' -AccessToken <plaintext token>
   The same query and results as above, but the provided access token will be 
   used and will not be stored anywhere.
   Get-LatestReleaseInfo -URL '' -Credential
   This will first request credentials in which the user can provide any username
   and a GitHub Personal Access Token for the password.  The access token will be
   stored encrypted within the user profile, and information for the latest release
   of PDFSam will be collected and returned as above.
   Copyright 2022 Teknowledgist

   This script/information is free: you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation, either version 2 of the 
   License, or (at your option) any later version.

   This script is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   GNU General Public License for more details.

   The GNU General Public License can be found at <>.
Function Get-LatestReleaseOnGitHub {
      [string]$URL = $null,

      [string]$AccessToken = $null,


   if ($URL -match '^https?://(?:www.)?github\.com/([^/]+)/?([^/]+)?(?:/.*)?$') {
      $ownerName = $Matches[1]
      if ($Matches.Count -gt 2) {
         $repositoryName = $Matches[2]
   } else {
      Write-Warning "URL must be in the form 'http[s]://[www.]<owner>/<repo>'."
      Throw 'URL not in recognized form.'
   $LatestURL = "$OwnerName/$RepositoryName/releases/latest"

   $headers = @{
      'Accept' = 'application/vnd.github.v3+json'
      'User-Agent' = 'GetLatest@GitHub'

   $accessTokenFilePath = Join-Path $env:LOCALAPPDATA 'LatestReleaseOnGH\accessToken.txt'
   if ($PSBoundParameters.ContainsKey('Credential')) {
      # Collect the access token in a PSCredential object
      $CredMessage = 'Provide your GitHub API Token in the Password field.  The username field is required but will be ignored.' + 
                  '  ***The API Token will be cached across PowerShell sessions.  If the password is blank, any cached password will be erased. ***'
      $Credential = Get-Credential -Message $CredMessage

      if ([String]::IsNullOrWhiteSpace($Credential.GetNetworkCredential().Password)) {
         # Erase any existing cached token when an empty credential is provided
         Remove-Item $accessTokenFilePath -Force -ErrorAction SilentlyContinue
         Write-Verbose 'Cached Access Token has been erased.'
         $NoTokenMsg = 'Access Token was empty/blank. '
      } else {
         $AccessToken = $Credential.GetNetworkCredential().Password
         Write-Verbose "If the provided Access Token is valid and active, it will be cached."
         $SaveNew = $true
   } else {
      if (-not $AccessToken) {
         If (Test-Path $accessTokenFilePath) {
            $content = Get-Content -Path $accessTokenFilePath -ErrorAction Ignore
            if (-not [String]::IsNullOrEmpty($content)) {
               $secureString = $content | ConvertTo-SecureString
               Write-Verbose "Retrieving Access Token from cache file.  This value can be cleared in the future using the 'Credential' switch and providing an empty password."
               $accessTokenCredential = New-Object System.Management.Automation.PSCredential 'ignored', $secureString
               $AccessToken = $accessTokenCredential.GetNetworkCredential().Password
            } else {
               $NoTokenMsg = "Access Token was empty/blank. "
         } else {
            $NoTokenMsg = "No cached Access Token found. "
   if (-not $AccessToken) {
      Write-Warning "$NoTokenMsg GitHub will limit queries to 60 per hour."
   } else {
      $headers.Authorization = "token $AccessToken"

   $originalSecurityProtocol = [Net.ServicePointManager]::SecurityProtocol
   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

   $IWRparams = @{
      Uri = $LatestURL
      Method = 'Get'
      Headers =  $headers
      UseDefaultCredentials = $true
      UseBasicParsing = $true
      TimeoutSec = 0
   Try {
      $result = Invoke-WebRequest @IWRparams
   } catch {
      if ($_.Exception.Response.StatusCode.value__ -eq 404) {
         Write-Warning "The URL, '$URL' does not appear to exist."
      } elseif ($_.Exception.Response.StatusCode.value__ -eq 401) {
         Write-Warning 'The provided access token is not authorized to access this repository.'
      Throw $_.Exception.Message
   } finally {
      [Net.ServicePointManager]::SecurityProtocol = $originalSecurityProtocol

   if ($SaveNew) {
      # This comes after the query because only working tokens should be cached
      $Credential.Password | ConvertFrom-SecureString | Set-Content -Path $accessTokenFilePath -Force

   if ($result.StatusCode -eq 202) {
      Throw 'The server is busy right now.  Please try again later.'

   $finalResult = $result.Content | ConvertFrom-Json

   $defaultDisplaySet = 'Name','Tag','AssetCount','Description'
   #Create the default property display set
   $defaultDisplayPropertySet = New-Object System.Management.Automation.PSPropertySet('DefaultDisplayPropertySet',[string[]]$defaultDisplaySet)
   $PSStandardMembers = [Management.Automation.PSMemberInfo[]]@($defaultDisplayPropertySet)

   $InfoObject = [pscustomobject]@{
      Name          = $finalResult.Name
      Tag           = $finalResult.tag_name | Select-Object -first 1
      Description   = $finalResult.body
      TarballURL    = "$ownerName/$repositoryName/archive/refs/tags/$($finalResult.tag_name | Select-Object -first 1).tar.gz"
      ZipballURL    = "$ownerName/$repositoryName/archive/refs/tags/$($finalResult.tag_name | Select-Object -first 1).zip"
      AssetCount    = $finalResult.assets.count
      Assets        = foreach ($item in $finalResult.assets) {
                        FileName         = $
                        CreationDate = get-date $item.created_at
                        Size         = $item.size
                        DownloadURL  = $item.Browser_download_url
   $InfoObject | Add-Member MemberSet PSStandardMembers $PSStandardMembers


Set-Alias Get-LaRGH Get-LatestReleaseOnGitHub

Export-ModuleMember -Function Get-LatestReleaseOnGitHub -Alias Get-LaRGH
# Module manifest for module 'LaRGH'

# Script module or binary module file associated with this manifest.
RootModule = 'LaRGH.psm1'

# Version number of this module.
ModuleVersion = '0.1'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = 'bf45ddd2-ae6e-4034-895c-2b9ecd56b612'

# Author of this module
Author = 'Teknowledgist'

# Company or vendor of this module
CompanyName = 'Unknown'

# Copyright statement for this module
Copyright = '(c) 2022 Teknowledgist. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Retrieving the latest release of a project on GitHub'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'

# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Get-LatestReleaseOnGitHub'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'Get-LaRGH'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        Tags = 'chocolatey', 'update'

        # A URL to the license for this module.
        LicenseUri = ''

        # A URL to the main website for this project.
        ProjectUri = ''

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        ReleaseNotes = ''

    } # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''


$ErrorActionPreference = 'Stop'

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition

$ModuleDir  = $env:psmodulepath.split(';') | Where-Object {$_ -like "$env:programfiles*"} | Select-Object -first 1

# remove the old version for an upgrade
Remove-Item -Force -Recurse "$ModuleDir\LaRGH" -ErrorAction ignore

Write-Host "LaRGH module successfully removed from this system."

$ErrorActionPreference = 'Stop'

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition

$ModuleDir  = $env:psmodulepath.split(';') | Where-Object {$_ -like "$env:programfiles*"} | Select-Object -first 1

# remove the old version for an upgrade
Remove-Item -Force -Recurse "$ModuleDir\LaRGH" -ErrorAction ignore

$null = New-Item -ItemType Directory "$ModuleDir\LaRGH" -ErrorAction Ignore

Copy-Item -Recurse -Force "$toolsPath\LaRGH"  $ModuleDir

$res = Get-Module LaRGH -ListAvailable | Where-Object { (Split-Path $_.ModuleBase) -eq $ModuleDir }
if (!$res) { throw 'Module installation failed' }

Write-Host "`n$($res.Name) version $($res.Version) installed successfully at '$ModuleDir\LaRGH'"

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status


  • 0.1 - initial release

This package has no dependencies.

Discussion for the Latest Release on GitHub Helper Package

Ground Rules:

  • This discussion is only about Latest Release on GitHub Helper and the Latest Release on GitHub Helper package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Latest Release on GitHub Helper, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus