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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like