Author Posts

April 14, 2018 at 5:57 pm

I'm running PowerShell 5.1 on Windows 10. From within ISE anytime I press ctrl-space to get parameter options I am greeted with this error. How can this be fixed so it stops crashing?

—————————
Windows PowerShell ISE – Error
—————————
An unexpected error has occurred, and Windows PowerShell ISE must close.
—————————
OK
—————————

April 14, 2018 at 10:21 pm

This sounds environment on your side, as this should not be doing this.

The ISE console is really more of just an output window, though you can obviously do interactive stuff in it and cmdlet runs.
Well with some limitations, for example and interactive DOS level commands don't work and you'd have to specify any and all params to use the DOS-like stuff.

In getting params in the ISE, there should be little need to do the crtl+spacebar, because using the '-' after a cmdlet would use intellisense to automatically pop the list of available parameters.

Using crtl+spacebar in the ISE script pane, the ISE console or the console host, without a space after the cmdlet/function will not pop a parameter list, but a cmdlet/function list. Doing the same thing with a space after the cmdelt/function will pop a directory / file list. Doing the same thing after a cmdlet/function name a space and the a '-', leverages intellisense to pop the parameter list.

April 15, 2018 at 2:39 pm

That is all well and good but how do I find and fix the problem with my environment? PowerShell seems baked into the Win10 OS and cannot be simply uninstalled and reinstalled. How can I refresh my PowerShell environment so this stops? This is a real productivity killer and I am probably not the only one to have this problem so finding a fix would be helpful for me and anyone else who comes across this problem.

Here is a clip of the error in action. https://1drv.ms/v/s!AiMOucOyxOOXpv9HNcBhtRB_3EenRQ

This was found in the Event Log.

Fault bucket 1812796752988013931, type 5
Event Name: PowerShell
Response: Not available
Cab Id: 0

Problem signature:
P1: PowerShell_ISE.exe
P2: 10.0.17133.73
P3: System.NullReferenceException
P4: System.Reflection.TargetInvocation
P5: indows.PowerShell.GuiExe.Internal.GPowerShell.Main
P6: System.RuntimeMethodHandle.InvokeMethod
P7: unknown
P8:
P9:
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCFC.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD1C.tmp.xml
WPR_initiated_DiagTrackMiniLogger_One Trace User Logger_20180413 Event Collector_0_inject.etl
\\?\C:\Users\Tim\AppData\Local\Temp\WERD8A.tmp.etl
WPR_initiated_DiagTrackMiniLogger_WPR System Collector_inject.etl
\\?\C:\Users\Tim\AppData\Local\Temp\WERD8B.tmp.etl
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD88.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDA9.tmp.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\Critical_PowerShell_ISE.e_e2745585682c4b8155c7a88cbc449178e619e3d_00000000_11751de4

Analysis symbol:
Rechecking for solution: 0
Report Id: e623efbd-07de-433c-864a-d66b781fec1a
Report Status: 268435456
Hashed bucket: af516355a9c3f706f928590acfd5056b
Cab Guid: 0

April 16, 2018 at 8:21 pm

From what someone said on StackExchange this appears to be a known bug with the Windows Insider Preview builds 17093-17133. Hope this helps someone.