None. PowerShell 7 is a standalone install.
Windows 11 ships with Windows-Only PowerShell 5.1. This is a separate, older product that remains
installed and untouched. Cross-Platform PowerShell (Core) installs alongside it and adds a new pwsh command.
Continuous Delphi scripts and tests use pwsh and not powershell.
winget is built into Windows 11. Open a terminal and run:
winget install --id Microsoft.PowerShellwinget will download and install the latest stable PowerShell 7 release. Accept the UAC prompt when it appears.
- Go to https://github.com/PowerShell/PowerShell/releases/latest
- Download the
.msifile for your architecture (most machines:PowerShell-7.x.x-win-x64.msi) - Run the installer and accept the defaults
- Ensure "Add PowerShell to PATH Environment Variable" is checked
Open a new terminal window after installation (PATH changes require a new session) and run:
pwsh --versionExpected output:
PowerShell 7.5.x
The version number should be 7.4.0 or higher. If the command is not found, close and reopen
your terminal. If it still fails, verify that C:\Program Files\PowerShell\7 is in your
system PATH.
(Get-Command pwsh).SourceExpected: C:\Program Files\PowerShell\7\pwsh.exe
If this returns a different path, an older or alternative PowerShell installation may be taking precedence in PATH.
powershell(Windows PowerShell 5.1) andpwsh(PowerShell 7) are different executables. Always usepwshforContinuous Delphiscripts.- PowerShell 7 updates do not affect Windows PowerShell 5.1.
- You can have multiple PowerShell 7 minor versions installed simultaneously as needed.
Used by delphi-compiler-versions and likely other repos
Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Forcesee also: https://learn.microsoft.com/en-us/powershell/module/psscriptanalyzer