keep getting error 80040154

Welcome Forums General PowerShell Q&A keep getting error 80040154

Viewing 1 reply thread
  • Author
    • #202010
      Topics: 5
      Replies: 4
      Points: 42
      Rank: Member

      Hi team,

      I’m trying to create a script in notepad, every script i create, unless it’s a basic one line, gives me an error code 80040154. I’ve looked all over online, and currently and have set my execution policy to unrestricted access, i am running as an admin, i have a 64 bit. I get that error code 80040154, for both 64 bit Powershell, and Powershell(x86). I am not sure where to go/do to fix this problem. I am pretty new to coding, and have had only a few hours of researching into Powershell. I did get “Learn Windows Powershell in a month of lunches”, which is helping, but i am still stuck, any help would mean a lot, thank you.

    • #202106
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero

      Welcome to!

      First suggestion is to use a Powershell editor, Powershell ISE is the default editor but Visual Studio Code is working towards replacing Powershell ISE and has a ton of other features. Both of these editors have intelli-sense, run selection, run, code highlight, nesting, etc.that will make the experience much better.

      Second, if you are still having issues executing code, be specific. Are you executing a command and getting that error in the Powershell session? Is the error crashing Powershell? Try $PSVersionTable, to show what version of Powershell you are working on. How are you executing the code? Provide details on exactly what you are doing to produce the scenario.

Viewing 1 reply thread
  • The topic ‘keep getting error 80040154’ is closed to new replies.