Windows 11 Powershell - Most commands not working

Daniel Mielke 1 Reputation point
2022-03-04T19:41:00.853+00:00

Hi!

I've been having the problem for a few weeks now, that my Powershell can no longer execute the majority of my commands.

This includes npm, nvm, and code (to start Visual Studio Code).

Git still seems to work, so does geth, but the rest is gone and I don't know what the problem is.

I've already "reinstalled" powershell, as well as checked my environment variables - everything seems fine there.

180245-screenshot-2022-03-04-203628.png

180274-screenshot-2022-03-04-203643.png

180238-screenshot-2022-03-04-203656.png

180198-screenshot-2022-03-04-203706.png

I should add, that I upgraded to Windows 11 a few days/weeks before the problem occurred. I think (but I'm not sure), that everything worked immediately after that.

For a while not even git worked out.

I have already reinstalled node.js.

Do you have any idea what this could be?

Thanks in advance!

Daniel

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rich Matheisen 48,026 Reputation points
    2022-03-04T20:29:17.63+00:00

    Does this help? Others having the same problem, but it doesn't seem to be specific to any version of PowerShell.

    why-is-npm-not-working-on-windows-10-after-installing-latest-nodejs
    npm-gives-a-typeerror-every-time-i-run-it
    3650

    0 comments No comments

  2. MotoX80 37,156 Reputation points
    2022-03-04T20:35:13.547+00:00

    In those PS prompts, run these commands to verify that something isn't modifying the path after PS starts. Use where to search for those programs.

    ($env:path).split(';')
    ""
    where.exe nvm 
    where.exe code 
    where.exe powershell 
    
    0 comments No comments

  3. Shivansh Srivastava 1 Reputation point
    2022-12-02T12:01:37.643+00:00

    Same for Me but I have found a temporary fix adding ".\" b4 commands seems to work .. will update if i found a parmanent fix..

    0 comments No comments

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.