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


pillainp

Well-known member
Member
Local time
7:11 PM
Posts
27
OS
Windows 11 Pro x64 25H2 26200.8894
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 My Computers

  • At a glance

    Windows 11 Pro x64 25H2 26200.8894Intel Core Ultra 7 270K Plus64GB (2*32GB) G.Skill TridentZ DDR5 6000MHz 3...Sapphire NITRO+ AMD Radeon™ RX 7900 XTX Vapor...
    OS
    Windows 11 Pro x64 25H2 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    CUSTOM
    CPU
    Intel Core Ultra 7 270K Plus
    Motherboard
    AsRock Z890 Phantom Gaming Nova wifi
    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
    Onboard ALC4082
    Monitor(s) Displays
    Dell UP2716D
    Screen Resolution
    2560 X 1440
    Hard Drives
    1 x 1TB SAMSUNG 9100 PRO NVME Gen5 M.2
    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 860 EVO 2TB SATAIII SSD; (MZ-76E2T0BW)
    PSU
    ANTEC HCG1200 PRO PLATINUM
    Case
    Fractal Design Meshify 2 XL
    Cooling
    ARCTIC LIQUID FREEZER III PRO 420MM ARGB
    Keyboard
    Logitech G512
    Mouse
    Logitech G502 X Hero
    Internet Speed
    1Gbps Asianet FTTH
    Browser
    Maxthon 7
    Antivirus
    Avast Ultimate
  • Computer type
    Laptop
Open the mentioned profile.ps1 in Notepad, and edit line #4. It should read:
Code:
Import-Module -Name Microsoft.WinGet.Client
 

My Computer My Computer

At a glance

Windows 7
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 My Computers

  • At a glance

    Windows 11 Pro x64 25H2 26200.8894Intel Core Ultra 7 270K Plus64GB (2*32GB) G.Skill TridentZ DDR5 6000MHz 3...Sapphire NITRO+ AMD Radeon™ RX 7900 XTX Vapor...
    OS
    Windows 11 Pro x64 25H2 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    CUSTOM
    CPU
    Intel Core Ultra 7 270K Plus
    Motherboard
    AsRock Z890 Phantom Gaming Nova wifi
    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
    Onboard ALC4082
    Monitor(s) Displays
    Dell UP2716D
    Screen Resolution
    2560 X 1440
    Hard Drives
    1 x 1TB SAMSUNG 9100 PRO NVME Gen5 M.2
    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 860 EVO 2TB SATAIII SSD; (MZ-76E2T0BW)
    PSU
    ANTEC HCG1200 PRO PLATINUM
    Case
    Fractal Design Meshify 2 XL
    Cooling
    ARCTIC LIQUID FREEZER III PRO 420MM ARGB
    Keyboard
    Logitech G512
    Mouse
    Logitech G502 X Hero
    Internet Speed
    1Gbps Asianet FTTH
    Browser
    Maxthon 7
    Antivirus
    Avast Ultimate
  • Computer type
    Laptop
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 My Computer

At a glance

Windows 11 Enterprise 25H2 [rev. 8893]
OS
Windows 11 Enterprise 25H2 [rev. 8893]

Latest Support Threads

Back
Top Bottom