Last active
January 25, 2021 23:32
-
-
Save chelnak/8614ffb320c20c1219f9 to your computer and use it in GitHub Desktop.
Download the latest zip ball release of a github project
This file contains 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
# --- Set the uri for the latest release | |
$URI = "https://api.github.com/repos/chelnak/vRAAPIClient/releases/latest" | |
# --- Query the API to get the url of the zip | |
$Response = Invoke-RestMethod -Method Get -Uri $URI | |
$ZipUrl = $Response.zipball_url | |
# --- Download the file to the current location | |
$OutputPath = "$((Get-Location).Path)\$($Response.name.Replace(" ","_")).zip" | |
Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment