Forum Discussion
pwsh.exe Not recognized, even after adding path?
I'm a little reluctant to reply given this is about Windows Home as a lot of things remain unconfigurable and different when compared to Windows Enterprise and Professional (and their ilk.)
That said, it's important to note there are two "PowerShells":
- Windows PowerShell (5.1)
- PowerShell (7.3)
These aren't the same thing.
Windows PowerShell is the traditional version that ships as part of Windows operating systems - i.e. you don't need to install it. This version lives under C:\Windows\System32\WindowsPowerShell\v1.0\ and the shell's name is powershell.exe. This version is Windows-only.
PowerShell (no Windows prefixed) is the cross-platform version of PowerShell.
On Windows, and assuming a system installation has been performed, it lives under C:\Program Files\PowerShell\7\ and the shell's name is pwsh.exe.
So, if you set your path to include C:\Windows\System32\WindowsPowerShell\, you will find powershell.exe but not pwsh.exe, in which case the error is valid.
Here's a convenient landing page that summarises key differences between Windows PowerShell and PowerShell:
Cheers,
Lain