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 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,100 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,574 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rich Matheisen 47,306 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 34,681 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 Answers by the question author, which helps users to know the answer solved the author's problem.