Share via

Powershell not added to system path

Tanner Knapp 0 Reputation points
2026-03-05T18:35:41.05+00:00

While tyrying to install a app it told me that powershell was not added to the system path how do i fix that

Windows for home | Windows 11 | Apps
0 comments No comments

2 answers

Sort by: Most helpful
  1. Clary-N 10,570 Reputation points Microsoft External Staff Moderator
    2026-03-06T01:14:02.6333333+00:00

    Hi Tanner Knapp,

    Thank you for reaching out to Microsoft Q&A forum. I understand how inconvenient this can be when an app install is blocked because PowerShell isn’t being detected correctly.

    I can see that Q&A Assist has already suggested a few steps, so I’ll quickly summarize those first:

    1. Confirm PowerShell 7 is installed
      • Default install location is: C:\Program Files\PowerShell\7 (executable: pwsh.exe).
      • If PowerShell 7 is not installed, download and install it using the official MSI package (x64 / x86 / ARM64). The MSI installer automatically adds it to PATH.
    2. Verify PowerShell 7 is listed in PATH
      • Go to Advanced system settings > Environment Variables.
      • Under System variables, select Path > Edit.
      • Make sure C:\Program Files\PowerShell\7 is listed (do not remove existing entries).
      • Save changes.
    3. Restart command windows
      • Close and reopen any Command Prompt, PowerShell, or Terminal windows so Windows picks up the PATH change, then retry the app installation.
    4. Confirm classic Windows PowerShell path
      • Some apps still expect powershell.exe.
      • Make sure this path is present in PATH: C:\Windows\System32\WindowsPowerShell\v1.0
      • If it’s missing, add it using the same Environment Variables > Path steps.

    If you’ve already tried them and the issue still occurs, please continue with the additional steps below:

    Step 1: Restart Windows Explorer to refresh system changes

    Sometimes Windows doesn’t immediately apply environment changes.

    • Press Ctrl + Shift + Esc to open Task Manager
    • Find Windows Explorer, right‑click it, and choose Restart
    • Once it reloads, reopen Command Prompt or the installer and test again

    Step 2: Make sure Windows PowerShell is enabled PowerShell can occasionally be disabled by system changes or features.

    • Press Windows + R, type optionalfeatures, and press Enter
    • In the list, make sure Windows PowerShell is checked
    • If you make any changes, restart the PC and try the installer again

    Step 3: Run the installer with administrator permissions

    Some installers need elevated permissions to call PowerShell correctly. Right‑click the installer (or Command Prompt) and choose Run as administrator.

    Step 4: Check for system file issues

    If the issue persists, repairing Windows system files can help.

    • Open Command Prompt as administrator
    • Run: sfc /scannow
    • Let it complete, then restart the PC

    If the problem continues after these steps, please let me know the exact error message you’re seeing (for example, whether it mentions powershell or pwsh). I’ll be happy to help narrow it down further.


    If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Q&A Assist
    2026-03-05T18:35:53.5033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To fix this, add the PowerShell install folder to the PATH environment variable.

    On Windows (using the MSI-installed PowerShell 7 as example):

    1. Confirm the install location
      • Default for PowerShell 7: C:\Program Files\PowerShell\7 (the executable is pwsh.exe).
    2. Open Environment Variables
      • Right-click This PC or My ComputerProperties.
      • Select Advanced system settings.
      • Select Environment Variables.
    3. Edit the PATH variable
      • Under System variables, select PathEdit.
      • Select New and add the folder path, for example:
        • C:\Program Files\PowerShell\7
      • Do not remove any existing entries.
      • Select OK on all dialogs to save.
    4. Restart any open Command Prompt/PowerShell/terminal windows and retry the app install.

    If PowerShell 7 is not installed, install it first using the MSI package, which automatically adds its path to PATH:

    1. Download the appropriate MSI (x64/x86/Arm64) for Windows.
    2. Run the MSI and follow the prompts.
    3. After installation, pwsh.exe is available in C:\Program Files\PowerShell\7 and added to PATH.

    If the app expects Windows PowerShell (powershell.exe), make sure this path is present in PATH as well (normally it is by default):

    • C:\Windows\System32\WindowsPowerShell\v1.0

    If it is missing, add it using the same Environment Variables → Path → Edit steps.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.