{"id":50605198,"url":"https://github.com/jonlabelle/pwsh-upstall","last_synced_at":"2026-06-05T22:01:31.050Z","repository":{"id":329760306,"uuid":"1118364669","full_name":"jonlabelle/pwsh-upstall","owner":"jonlabelle","description":"This repo provides platform-specific upstall (update/install) scripts for PowerShell Core","archived":false,"fork":false,"pushed_at":"2026-04-26T14:35:52.000Z","size":316,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T16:23:36.313Z","etag":null,"topics":["installer","linux","macos","powershell","pwsh","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/jonlabelle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-17T16:37:13.000Z","updated_at":"2026-04-26T14:35:55.000Z","dependencies_parsed_at":"2026-02-14T19:05:21.706Z","dependency_job_id":null,"html_url":"https://github.com/jonlabelle/pwsh-upstall","commit_stats":null,"previous_names":["jonlabelle/pwsh-upstall"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonlabelle/pwsh-upstall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlabelle%2Fpwsh-upstall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlabelle%2Fpwsh-upstall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlabelle%2Fpwsh-upstall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlabelle%2Fpwsh-upstall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonlabelle","download_url":"https://codeload.github.com/jonlabelle/pwsh-upstall/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlabelle%2Fpwsh-upstall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33961252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["installer","linux","macos","powershell","pwsh","windows"],"created_at":"2026-06-05T22:01:29.866Z","updated_at":"2026-06-05T22:01:31.040Z","avatar_url":"https://github.com/jonlabelle.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerShell Core Upstall Scripts\n\n[![ci](https://github.com/jonlabelle/pwsh-upstall/actions/workflows/ci.yml/badge.svg)](https://github.com/jonlabelle/pwsh-upstall/actions/workflows/ci.yml)\n\nInstall, update, check, or uninstall PowerShell Core on Windows, macOS, and Linux from official GitHub releases with SHA256 verification.\n\n| Platform | Script                                                   | Supported Architectures        |\n| -------- | -------------------------------------------------------- | ------------------------------ |\n| Windows  | [`pwsh-upstall-windows.ps1`](./pwsh-upstall-windows.ps1) | x64/arm64                      |\n| macOS    | [`pwsh-upstall-macos.sh`](./pwsh-upstall-macos.sh)       | Apple Silicon and Intel        |\n| Linux    | [`pwsh-upstall-linux.sh`](./pwsh-upstall-linux.sh)       | x64/arm64, glibc/musl (Alpine) |\n\n\u003e Upgrades remove the previously installed version by default. Use `--keep-old-version` or `-KeepOldVersion` to keep it.\n\n![Checks if PowerShell is up to date](screenshot.png \"Checks if PowerShell is up to date\")\n\n## Table of Contents\n\n- [Quick Install](#quick-install)\n  - [Windows](#windows)\n  - [macOS](#macos)\n  - [Linux](#linux)\n- [Common Actions](#common-actions)\n- [Options](#options)\n- [Environment Token Resolution](#environment-token-resolution)\n- [Select a Version](#select-a-version)\n- [Run with Options](#run-with-options)\n  - [macOS/Linux](#macoslinux)\n  - [Windows](#windows-1)\n- [Run from a Local Copy](#run-from-a-local-copy)\n  - [Clone with Git](#clone-with-git)\n  - [Download the Archive](#download-the-archive)\n- [Troubleshooting](#troubleshooting)\n- [License](#license)\n\n## Quick Install\n\nThese one-liners install or update to the latest stable release.\n\n\u003e You'll need to [download the script](#download-the-archive) first if you need [options](#options) like `--tag`, `--check`, or `-WhatIf`.\n\n### Windows\n\n\u003e [!Important]\n\u003e Requires Administrator privileges. Use an [elevated Windows PowerShell (`powershell.exe`) prompt](https://learn.microsoft.com/powershell/scripting/windows-powershell/starting-windows-powershell#run-with-administrative-privileges), not PowerShell Core (`pwsh.exe`), to avoid process-in-use errors.\n\n```powershell\nirm 'https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-windows.ps1' |\n    powershell -NoProfile -ExecutionPolicy Bypass -\n```\n\n### macOS\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-macos.sh | bash\n```\n\n### Linux\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-linux.sh | sh\n```\n\n## Common Actions\n\n**Windows:**\n\n| Action                           | Command                                                  |\n| -------------------------------- | -------------------------------------------------------- |\n| Install/update latest stable     | `powershell -File .\\pwsh-upstall-windows.ps1`            |\n| Check if up to date (no install) | `powershell -File .\\pwsh-upstall-windows.ps1 -Check`     |\n| Uninstall                        | `powershell -File .\\pwsh-upstall-windows.ps1 -Uninstall` |\n\n**macOS:**\n\n| Action                           | Command                                    |\n| -------------------------------- | ------------------------------------------ |\n| Install/update latest stable     | `bash ./pwsh-upstall-macos.sh`             |\n| Check if up to date (no install) | `bash ./pwsh-upstall-macos.sh --check`     |\n| Uninstall                        | `bash ./pwsh-upstall-macos.sh --uninstall` |\n\n**Linux:**\n\n| Action                           | Command                                  |\n| -------------------------------- | ---------------------------------------- |\n| Install/update latest stable     | `sh ./pwsh-upstall-linux.sh`             |\n| Check if up to date (no install) | `sh ./pwsh-upstall-linux.sh --check`     |\n| Uninstall                        | `sh ./pwsh-upstall-linux.sh --uninstall` |\n\n## Options\n\n| Purpose                             | macOS/Linux          | Windows                               |\n| ----------------------------------- | -------------------- | ------------------------------------- |\n| Select version                      | `--tag \u003ctag\u003e`        | `-Tag \u003ctag\u003e`                          |\n| Save downloaded package/installer   | `--out-dir \u003cdir\u003e`    | `-OutDir \u003cpath\u003e`                      |\n| Keep downloaded package/installer   | `--keep`             | `-Keep`                               |\n| Reinstall even if already installed | `--force`            | `-Force`                              |\n| Keep old version during upgrade     | `--keep-old-version` | `-KeepOldVersion`                     |\n| Check only (no install)             | `--check`            | `-Check`                              |\n| Uninstall                           | `--uninstall`        | `-Uninstall`                          |\n| Skip SHA256 verification            | `--skip-checksum`    | `-SkipChecksum`                       |\n| Dry run                             | `-n, --dry-run`      | `-WhatIf`                             |\n| Help                                | `-h, --help`         | `Get-Help .\\pwsh-upstall-windows.ps1` |\n\n\u003e [!Note]\n\u003e Windows automatically detects x64/arm64 architecture, requires Administrator privileges, and installs to `Program Files\\PowerShell\\7`.\n\n## Environment Token Resolution\n\nFor GitHub API requests, each script checks `GITHUB_TOKEN` first, then `GH_TOKEN`. If either is set, it is sent as a bearer token to help avoid GitHub API rate limits; if neither is set, requests are unauthenticated.\n\n## Select a Version\n\nUse semver selectors to choose a release:\n\n```text\nv7      -\u003e latest 7.x release\nv7.6    -\u003e latest 7.6.x release\nv7.6.1  -\u003e specific patch release\n```\n\nExamples:\n\n```bash\nbash ./pwsh-upstall-macos.sh --tag v7\nsh ./pwsh-upstall-linux.sh --tag v7.6\n```\n\n```powershell\npowershell -File .\\pwsh-upstall-windows.ps1 -Tag v7.6.1\n```\n\n\u003e [!Note]\n\u003e Prereleases require an exact tag, for example `v7.6.0-preview.1`. Default, latest, major, and minor version selectors resolve to stable releases only.\n\n## Run with Options\n\nDownload the script first when you need to pass options.\n\n### Windows\n\n```powershell\nInvoke-WebRequest `\n    -Uri https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-windows.ps1 `\n    -OutFile pwsh-upstall-windows.ps1\n\npowershell -File .\\pwsh-upstall-windows.ps1 -Tag v7.6\n```\n\n### macOS/Linux\n\n```bash\n# macOS\ncurl -fsSLO https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-macos.sh\nbash ./pwsh-upstall-macos.sh --tag v7.6\n\n# Linux\ncurl -fsSLO https://raw.githubusercontent.com/jonlabelle/pwsh-upstall/refs/heads/main/pwsh-upstall-linux.sh\nsh ./pwsh-upstall-linux.sh --tag v7.6\n```\n\n## Run from a Local Copy\n\n### Clone with Git\n\n```bash\ngit clone https://github.com/jonlabelle/pwsh-upstall.git\ncd pwsh-upstall\n\n# macOS\nbash ./pwsh-upstall-macos.sh\n\n# Linux\nsh ./pwsh-upstall-linux.sh\n\n# Windows (from PowerShell, requires Administrator privileges)\npowershell -File .\\pwsh-upstall-windows.ps1\n```\n\n### Download the Archive\n\n**Windows:**\n\n```powershell\nInvoke-WebRequest -Uri https://github.com/jonlabelle/pwsh-upstall/archive/refs/heads/main.zip -OutFile pwsh-upstall.zip\nExpand-Archive -Path pwsh-upstall.zip -DestinationPath .\nSet-Location .\\pwsh-upstall-main\n\n# Requires Administrator privileges\npowershell -File .\\pwsh-upstall-windows.ps1\n```\n\n**macOS/Linux:**\n\n```bash\ncurl -L -o pwsh-upstall.zip https://github.com/jonlabelle/pwsh-upstall/archive/refs/heads/main.zip\nunzip pwsh-upstall.zip\ncd pwsh-upstall-main\n\n# macOS\nbash ./pwsh-upstall-macos.sh\n\n# Linux\nsh ./pwsh-upstall-linux.sh\n```\n\n## Troubleshooting\n\n- **Checksum failed**: Retry the download. Use `--skip-checksum` only if you trust the source and accept the risk.\n- **Insufficient disk space**: Free at least 500 MB and rerun the script.\n- **Permission denied**: Run with `sudo` on Linux/macOS or as Administrator on Windows.\n- **Process in use (Windows)**: Exit `pwsh.exe` and run from `powershell.exe` instead.\n- **Windows options with one-liners**: Download the script and run it with `powershell -File .\\pwsh-upstall-windows.ps1 ...`.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonlabelle%2Fpwsh-upstall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonlabelle%2Fpwsh-upstall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonlabelle%2Fpwsh-upstall/lists"}