{"id":13679897,"url":"https://github.com/jdhitsolutions/PSReleaseTools","last_synced_at":"2025-04-29T19:32:15.568Z","repository":{"id":145020876,"uuid":"78055784","full_name":"jdhitsolutions/PSReleaseTools","owner":"jdhitsolutions","description":":shipit: A set of commands for working with PowerShell 7.x releases.","archived":false,"fork":false,"pushed_at":"2024-08-04T20:57:03.000Z","size":3175,"stargazers_count":114,"open_issues_count":8,"forks_count":96,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-25T01:11:32.842Z","etag":null,"topics":["powershell","powershell-core"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdhitsolutions.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://paypal.me/jdhitsolutions?locale.x=en_US"}},"created_at":"2017-01-04T21:48:59.000Z","updated_at":"2025-04-06T12:13:04.000Z","dependencies_parsed_at":"2024-01-14T15:24:00.974Z","dependency_job_id":"de9c5688-57be-4c9d-b434-913c80bec525","html_url":"https://github.com/jdhitsolutions/PSReleaseTools","commit_stats":{"total_commits":82,"total_committers":6,"mean_commits":"13.666666666666666","dds":"0.12195121951219512","last_synced_commit":"5c099b25bfa7d93b8e6fca90c739b2d2389b9a2f"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSReleaseTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSReleaseTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSReleaseTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSReleaseTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdhitsolutions","download_url":"https://codeload.github.com/jdhitsolutions/PSReleaseTools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251569550,"owners_count":21610575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","powershell-core"],"created_at":"2024-08-02T13:01:10.807Z","updated_at":"2025-04-29T19:32:12.399Z","avatar_url":"https://github.com/jdhitsolutions.png","language":"PowerShell","funding_links":["https://paypal.me/jdhitsolutions?locale.x=en_US"],"categories":["PowerShell"],"sub_categories":[],"readme":"# PSReleaseTools\n\n[![PSGallery Version](https://img.shields.io/powershellgallery/v/PSReleaseTools.png?style=for-the-badge\u0026logo=powershell\u0026label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/PSReleaseTools/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/PSReleaseTools.png?style=for-the-badge\u0026label=Downloads)](https://www.powershellgallery.com/packages/PSReleaseTools/)\n\n\u003cp align=\"left\"\u003e\u003cimg align=\"left\" src = \"images/PowerShell_avatar.png\"\u003e\u003c/p\u003e\n\nThis PowerShell module provides a set of commands for working with the latest releases from the [PowerShell GitHub repository](https://github.com/PowerShell/PowerShell). The module contains commands to get summary information about the most current PowerShell version as well as functions to download some or all of the release files or install the latest stable and/or preview build of PowerShell.\n\nThese commands utilize the GitHub API, which is subject to rate limits. It is recommended that you save results of commands like `Get-PSReleaseAsset` to a variable. If you encounter an error message for `Invoke-RestMethod` like \"Server Error\" then you have likely exceeded the API limit. You will need to wait a bit and try again. _*You do not need to have or use a GitHub account to use these commands.*_\n\nThis module should work cross-platform on both Windows PowerShell 5.1 and PowerShell 7.x, but is primarily intended for Windows platforms.\n\nYou can install this module from the PowerShell Gallery.\n\n```powershell\nInstall-Module PSReleaseTools\n```\n\n## The Module\n\nThe module currently has 9 commands:\n\n- [Get-PSReleaseCurrent](Docs/Get-PSReleaseCurrent.md)\n- [Get-PSReleaseSummary](Docs/Get-PSReleaseSummary.md)\n- [Get-PSReleaseAsset](Docs/Get-PSReleaseAsset.md)\n- [Save-PSReleaseAsset](Docs/Save-PSReleaseAsset.md)\n- [Install-PowerShell](Docs/Install-PowerShell.md)\n- [Install-PSPreview](Docs/Install-PSPreview.md)\n- [Get-PSIssue](Docs/Get-PSIssue.md)\n- [Get-PSIssueLabel](Docs/Get-PSIssueLabel.md)\n- [Open-PSIssue](Docs/Open-PSIssue.md)\n\nAll of the functions take advantage of the [GitHub API](https://developer.github.com/v3/ \"learn more about the API\") which in combination with either [Invoke-RestMethod](http://go.microsoft.com/fwlink/?LinkID=217034 \"read online help for the cmdlet\") or [Invoke-WebRequest](http://go.microsoft.com/fwlink/?LinkID=217035  \"read online help for the cmdlet\"), allow you to programmatically interact with GitHub.\n\n### Get Current Release\n\nThe first command, `Get-PSReleaseCurrent` can provide a quick summary view of the latest stable or preview release.\n\n```powershell\nPS C:\\\u003e Get-PSReleaseCurrent\n\nName                                   OnlineVersion       Released                    LocalVersion\n----                                   -------------       --------                    ------------\nv7.1.0 Release of PowerShell           7.1.0               11/11/2020 4:23:08 PM              7.1.0\n```\n\nThe command writes a custom object to the pipeline which has additional properties.\n\n```powershell\nPS C:\\\u003e Get-PSReleaseCurrent -preview | Select-Object *\n\nName         : v7.2.0-preview.2 Release of PowerShell\nVersion      : v7.2.0-preview.2\nReleased     : 12/15/2020 9:31:39 PM\nLocalVersion : 7.1.0\nURL          : https://github.com/PowerShell/PowerShell/releases/tag/v7.2.0-preview.2\nDraft        : False\nPrerelease   : True\n```\n\n### Summary Information\n\n`Get-PSReleaseSummary` queries the PowerShell repository release page and constructs a text summary. You can also have the command write the report text as markdown.\n\n![get-psreleasesummary.png](/images/get-psreleasesummary.png)\n\nI put the release name and date right at the top so you can quickly check if you need to download something new. In GitHub, each release file is referred to as an *asset*. The `Get-PSReleaseAsset` command will query GitHub about each file and write a custom object to the pipeline.\n\n```powershell\nPS C:\\\u003e Get-PSReleaseAsset\n\nFileName      : powershell-7.1.0-1.centos.8.x86_64.rpm\nFamily        : CentOS\nFormat        : rpm\nSizeMB        : 65\nHash          : F3985B24719534F27A6C603416C7644771E17C75AFBFD8E6D5E98390045BF9D3\nCreated       : 11/10/2020 8:08:04 PM\nUpdated       : 11/10/2020 8:08:06 PM\nURL           : https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell-7.1.0-1.centos.8.x86_64.rpm\nDownloadCount : 10509\n...\n```\n\nBy default, the command will display assets for all platforms, but I added a `-Family` parameter if you want to limit yourself to a single entry like MacOS.\n\n```powershell\nPS C:\\\u003e Get-PSReleaseAsset -Family MacOS\n\nFileName      : powershell-7.1.0-osx-x64.pkg\nFamily        : MacOS\nFormat        : pkg\nSizeMB        : 63\nHash          : 9B7397266711B279B5413F42ABC899730539C8D78A29FD116E19A1BB78244D78\nCreated       : 11/10/2020 8:08:18 PM\nUpdated       : 11/10/2020 8:08:20 PM\nURL           : https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell-7.1.0-osx-x64.pkg\nDownloadCount : 47202\n\nFileName      : powershell-7.1.0-osx-x64.tar.gz\nFamily        : MacOS\nFormat        : gz\nSizeMB        : 63\nHash          : 10CE8B2837F30F127F866E9680F518B9AA6288222C24B62AD1CAD868FB2A66E9\nCreated       : 11/10/2020 8:08:21 PM\nUpdated       : 11/10/2020 8:08:26 PM\nURL           : https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell-7.1.0-osx-x64.tar.gz\nDownloadCount : 3657\n...\n```\n\nOf course, you will want to download these files, which is the job of the last command. By default, `Get-PSReleaserAsset` will save all files to the current directory unless you specify a different path. You can limit the selection to a specific platform with the `-Family` parameter, which uses a validation set.\n\n```powershell\nPS C:\\\u003e Save-PSReleaseAsset -Family Ubuntu -Path D:\\Temp -WhatIf\nWhat if: Performing the operation \"Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell_7.1.0-1.ubuntu.16.04_amd64.deb\" on target \"D:\\temp\\powershell_7.1.0-1.ubuntu.16.04_amd64.deb\".\nWhat if: Performing the operation \"Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell_7.1.0-1.ubuntu.18.04_amd64.deb\" on target \"D:\\temp\\powershell_7.1.0-1.ubuntu.18.04_amd64.deb\".\nWhat if: Performing the operation \"Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell_7.1.0-1.ubuntu.20.04_amd64.deb\" on target \"D:\\temp\\powershell_7.1.0-1.ubuntu.20.04_amd64.deb\".\n```\n\nYou can select multiple names. If you choose Windows, there is a dynamic parameter called `-Format` where you can select ZIP or MSI. `Save-PSReleaseAsset` supports `-WhatIf`.\n\nI also realized you might run `Get-PSReleaseAsset`, perhaps to examine details before downloading. Since you have those objects, why not be able to pipe them to the save command?\n\n```powershell\nPS C:\\\u003e Get-PSReleaseAsset -Family Rhel  | Save-PSReleaseAsset -Path D:\\Temp -Passthru\n\n\n    Directory: D:\\Temp\n\n\nMode                 LastWriteTime         Length Name\n----                 -------------         ------ ----\n-a----         1/13/2021  11:13 AM       67752949 powershell-7.1.0-1.rhel.7.x86_64.rpm\n```\n\nThe current version of this module uses regular expression named captures to pull out the file name and corresponding SHA256 hashes. The save command then calls [Get-FileHash](https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-5.1\u0026WT.mc_id=ps-gethelp \"read online help for the cmdlet\") to get the current file hash and compares them.\n\n### Installing a Build\n\nOn Windows, it is pretty easy to install a new build with a one-line command:\n\n```powershell\nGet-PSReleaseAsset -Family Windows -Only64Bit -Format msi |\nSave-PSReleaseAsset -Path d:\\temp -Passthru | Invoke-Item\n```\n\nOr you can use one of two newer functions to install the latest 64bit release. You can specify the interaction level.\n\n [Install-PSPreview](/Docs/Install-PSPreview.md) will download the latest 64-bit _*preview*_ build for Windows and kick off the installation.\n\n ```powershell\nInstall-PSPreview -Mode Passive\n ```\n\n [Install-PowerShell](/Docs/Install-PowerShell.md) will do the same thing but for the latest stable release. The command retains `Install-PSCore` as an alias.\n\n```powershell\nInstall-PowerShell -Mode Quiet -EnableRemoting -EnableContextMenu -EnableRunContext\n```\n\nThe functionality of these commands could have been combined, but I decided to leave them as separate commands, so there is no confusion about what you are installing. In both cases, an installation log file will be created at `$env:TEMP\\PS7Install.log`.\n\nNon-Windows platforms have existing command-line installation tools that don't need to be replaced. Plus, I don't have the resources to develop and test installation techniques for all of the non-Windows options. That is why install-related commands in this module are limited to Windows.\n\n### Preview Builds\n\nBeginning with v0.8.0 of this module, command functions have a `-Preview` parameter, which will get the latest preview build. Otherwise, the commands will use the latest stable release.\n\n### PowerShell Repository Issues\n\nA new set of commands have been introduced in [v1.8.0](https://github.com/jdhitsolutions/PSReleaseTools/releases/tag/v1.8.0 \"see release 1.8.0\"). These commands are intended to make it easier for you to look at [issues from the PowerShell GitHub repository](https://github.com/PowerShell/PowerShell/issues). The idea is that you can take a peek at open issues from your PowerShell session and then open the issue in your browser to learn more or contribute.\n\n#### Get-PSIssue\n\n`Get-PSIssue` is intended to get open PowerShell issues from Github. With no parameters, you can get the 25 most recent issues. Use the `-Count` parameter to increase that value using one of the possible values. The actual number of issues returned may vary depending on the rest of your command and how GitHub pages results.\n\nYou can also fine-tune your search to get issues that have been updated since a given date. Finally, you can also limit your search to issues tagged with a specific label.\n\n![Get-PSIssue](images/get-psissue.png)\n\nThe function writes a custom object to the pipeline and includes a default formatted view. If you are running PowerShell 7, the issue body will be rendered as markdown.\n\nHere is another way you might use the command.\n\n![Get-PSIssue Summary](images/get-psissue-summary.png)\n\n__Note:__ The _PSIssue_ commands use the GitHub API and anonymous connections. The API has rate limits. If you run one of these commands excessively in a short period of time, you might see an error about exceeding the rate limit. If this happens, all you can do is wait an hour and try again. You can read more about GitHub rate-limiting [here](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting \"read the Github documentation on rate limiting\").\n\n#### Get-PSIssueLabel\n\nTo make it easier to search for issues based on a label run `Get-PSIssueLabel`. This command will list available labels from the PowerShell repository. However, you most likely won't need to run this command often. When you import the `PSReleaseTools` module, it will create a global variable called `$PSIssueLabel`.\n\n```powershell\nPS C:\\\u003e $PSIssueLabel\n\nname                         description\n----                         -----------\n.NET                         Pull requests that update .net code\nArea-Build\nArea-Cmdlets\nArea-Cmdlets-Archive\nArea-Cmdlets-Core\nArea-Cmdlets-Management\nArea-Cmdlets-Utility\nArea-Console\nArea-DSC\n...\n```\n\nThis variable is used as part of an argument completer for the `Labels` parameter on `Get-PSIssue`.\n\n#### Open-PSIssue\n\nFinally, you may want to respond to an issue. If you run `Open-PSIssue` without any parameters, it should open the Issues section of the PowerShell repository in your browser. Or you can pipe an issue object to the command, as long as you include the `Url` property.\n\n```powershell\nGet-PSIssue | Select-Object Updated,Labels,Title,Url | Out-GridView -PassThru | Open-PSIssue\n```\n\nThere are no plans to add a command to open a new issue from a PowerShell session. You can use `Open-PSIssue` to get to GitHub and then use your browser to submit a new issue.\n\n## Support\n\nIf you have suggestions or encounter problems, please post an issue in this GitHub repository. If you find this project useful, or any of my work, please consider a small support donation.\n\n[\u003ckbd\u003e:heart:Sponsor\u003c/kbd\u003e](https://paypal.me/jdhitsolutions?locale.x=en_US)\n\nLast Updated 2021-10-15 15:21:21Z\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2FPSReleaseTools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdhitsolutions%2FPSReleaseTools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2FPSReleaseTools/lists"}