Powershell Stopped Working, Can't Execute Scripts or Type into Shell

my powershell in Win10 has become completely nonfunctional.

  • If I try and execute a script it hangs on an empty shell window
  • If I load Powershell (with and without Admin) it displays the copyright info but I can't type anything
  • If I load the script into ISE the play button is greyed out but the stop button is active. If I press stop the play button remains grayed out. Also can't type into the ISE console window.
  • Restarted several times, same problem

Anyone know what this could be?

1

2 Answers

Luckily had another Win10 box handy, was some Registry weirdness. HKEY_CLASSES_ROOT\Microsoft.PowershellScript.1\Shell\0\Command

Was: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-file" "%1"

Should have been: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"

5

I found this trick in 2014 forum post: with the Powershell open press Ctrl+X then Ctrl+C. Worked for me.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest