Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerShell window launches then closes immediately

When I start PowerShell, it launches and the the window it opens in closes immediately.

I tried taking a screenshot and it says there's a registry error:

Reading the value of registry key SOFTWARE\Microsoft\PowerShell\3\PowerShellEngi ne\PowerShellVersion causes the following Win32 error: The system cannot find the file specified.

Why is this happening?

I'm running Windows 8.1.

like image 466
Ibra Him Avatar asked Nov 27 '22 18:11

Ibra Him


1 Answers

If anyone else is having this issue... I tried everything on this forum as well as Microsoft's.

Ended up being an issue with my ISE profile loading $moduleBrowser that kept crashing ISE after startup [Microsoft.PowerShellISE_profile.ps1].

Try launching ISE with no profile using powershell_ise.exe -noprofile. Then, open your PowerShellISE_profile.ps1. Comment it out, save it, close ISE.

Then try re-opening ISE, load your "commented-out" PowerShellISE_profile.ps1, step through your profile to see what is causing the failure.

like image 95
anonymous Avatar answered Dec 09 '22 11:12

anonymous