Powershell 7 issue in Windows 11 Pro 25H2 (Build 26200.6584)


pillainp

Well-known member
Local time
5:26 PM
Posts
24
OS
Windows 11 Pro x64 23H2 22635.4367
No matter how I install Powershell 7 (Winget, MSI downloaded from GitHub, or MS Store), I keep getting this error when trying to launch Powershell 7 through the terminal. No amount of Googling has provided a solution, so I came here for help.

Screenshot 2025-09-28 094159.webp

However, I can run Powershell 7 by itself through "pwsh.exe". But then it throws up this error:
Screenshot 2025-09-28 095447.webp
How do I solve this?
 
Windows Build/Version
Windows 11 25H2 (Build 26200.6584)
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro x64 23H2 22635.4367
    Computer type
    PC/Desktop
    Manufacturer/Model
    CUSTOM
    CPU
    Intel Core i7 13700K
    Motherboard
    Asus ROG Strix Z790-E WiFi Gaming Motherboard
    Memory
    64GB (2*32GB) G.Skill TridentZ DDR5 6000MHz 30-40-40-96 (F5-6000J3040G32GX2-TZ5RK)
    Graphics Card(s)
    Sapphire NITRO+ AMD Radeon™ RX 7900 XTX Vapor-X 24GB
    Sound Card
    ALC4080 with Savitech SV3H712 amplifier
    Monitor(s) Displays
    Dell UP2716D
    Screen Resolution
    2560 X 1440
    Hard Drives
    1 x 1TB SAMSUNG 990 PRO PCIe Gen4 M.2
    2 x 2TB SAMSUNG 990 PRO PCIe Gen4 M.2
    1 x SAMSUNG 980 PRO 500GB PCIE NVME - M.2 (MZ-V8P500)
    1 x SAMSUNG 970 EVO 250GB PCIE NVME - M.2 (MZ-V7E250BW)
    1 x SAMSUNG 860 EVO 2TB SATAIII SSD; (MZ-76E2T0BW)
    1 x SAMSUNG 870 QVO 8TB SATA SSD (MZ-77Q8T0BW) [TBA]
    PSU
    Coolermaster MWE 1050 Gold
    Case
    Fractal Design Meshify 2
    Cooling
    Coolermaster ML360 Illusion
    Keyboard
    Logitech G213 Prodigy
    Mouse
    Logitech G502 Hero
    Internet Speed
    1Gbps Asianet FTTH
    Browser
    Maxthon 7
    Antivirus
    Avast Ultimate
  • Operating System
    Windows 10 Pro x64
    Computer type
    Laptop
    Manufacturer/Model
    Asus FX553VD
    CPU
    Intel i7 7700HQ
    Memory
    16GB DDR4 2400MHz
    Graphics card(s)
    GeForce GTX1050
    Screen Resolution
    1920 x 1080
    Hard Drives
    1. Samsung 960 Evo 250GB PCIE NVMe;
    2. Samsung 840 Pro 256GB
Open the mentioned profile.ps1 in Notepad, and edit line #4. It should read:
Code:
Import-Module -Name Microsoft.WinGet.Client
 

My Computer

System One

  • OS
    Windows 7
Hi,

Managed a kludged workaround.

Problem 1:
  • Upon attempting to launch Powershell 7, Terminal was throwing an error saying that it could not find "C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe"
Solution:
  1. Created a folder named \Microsoft.PowerShell_8wekyb3d8bbwe in the path above
  2. Copied all the contents of "C:\Program Files\PowerShell\7\pwsh.exe" over to this folder
Problem 2:
  • Powershell could not load the module Microsoft.WinGet.Client

Solution:
  1. Edited the file "Microsoft.WinGet.CommandNotFound.psd1" located in "C:\Users\username\OneDrive\Documents\PowerShell\Modules\Microsoft.WinGet.CommandNotFound\1.0.4.0"
  2. Deleted the line @{ModuleName = 'Microsoft.WinGet.Client'; ModuleVersion = "1.8.1133" from the RequiredModules line.

All seems to be working fine now, and I can launch Powershell 7.5.3 through terminal and by itself (by executing pwsh.exe).

Questions arise, though:
  1. Why is there a Powershell folder in my Documents folder?
  2. Powershell 7 launches perfectly from the Administrator account but not the regular user account (which is also, by default, an administrator [with reduced privileges?]). Why?
  3. Why is Powershell not installing to the AppData folder if that is where it is supposed to be? At least Terminal is looking for it in AppData and not in Program Files?
  4. Is there any way to force Terminal to look for Powershell 7 in the Program Files folder?
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro x64 23H2 22635.4367
    Computer type
    PC/Desktop
    Manufacturer/Model
    CUSTOM
    CPU
    Intel Core i7 13700K
    Motherboard
    Asus ROG Strix Z790-E WiFi Gaming Motherboard
    Memory
    64GB (2*32GB) G.Skill TridentZ DDR5 6000MHz 30-40-40-96 (F5-6000J3040G32GX2-TZ5RK)
    Graphics Card(s)
    Sapphire NITRO+ AMD Radeon™ RX 7900 XTX Vapor-X 24GB
    Sound Card
    ALC4080 with Savitech SV3H712 amplifier
    Monitor(s) Displays
    Dell UP2716D
    Screen Resolution
    2560 X 1440
    Hard Drives
    1 x 1TB SAMSUNG 990 PRO PCIe Gen4 M.2
    2 x 2TB SAMSUNG 990 PRO PCIe Gen4 M.2
    1 x SAMSUNG 980 PRO 500GB PCIE NVME - M.2 (MZ-V8P500)
    1 x SAMSUNG 970 EVO 250GB PCIE NVME - M.2 (MZ-V7E250BW)
    1 x SAMSUNG 860 EVO 2TB SATAIII SSD; (MZ-76E2T0BW)
    1 x SAMSUNG 870 QVO 8TB SATA SSD (MZ-77Q8T0BW) [TBA]
    PSU
    Coolermaster MWE 1050 Gold
    Case
    Fractal Design Meshify 2
    Cooling
    Coolermaster ML360 Illusion
    Keyboard
    Logitech G213 Prodigy
    Mouse
    Logitech G502 Hero
    Internet Speed
    1Gbps Asianet FTTH
    Browser
    Maxthon 7
    Antivirus
    Avast Ultimate
  • Operating System
    Windows 10 Pro x64
    Computer type
    Laptop
    Manufacturer/Model
    Asus FX553VD
    CPU
    Intel i7 7700HQ
    Memory
    16GB DDR4 2400MHz
    Graphics card(s)
    GeForce GTX1050
    Screen Resolution
    1920 x 1080
    Hard Drives
    1. Samsung 960 Evo 250GB PCIE NVMe;
    2. Samsung 840 Pro 256GB
Questions arise, though:
  1. Why is there a Powershell folder in my Documents folder?

That's where your user-specific modules are stored, by default, along with your profile, if you make one.


 

My Computer

System One

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Core i7-1260P
    Motherboard
    NUC12WSBi7
    Memory
    64 GB Micron PC4-25600
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    on-board Realtek HD Audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840 x 2160
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Crucial MX500 2 TB
    Antivirus
    Microsoft Defender

Latest Support Threads

Back
Top Bottom