Solve IntelliSense hangs in Integrated Scripting Environment
Solve an annoying intellisense hang with the ISE.
February 27, 2016
Q. I am using the PowerShell Integrated Scripting Environment (ISE) however every command I type results in a 30 second delay that Intellisense is stopping. How do I fix this?
A. I recently saw this on a box that an add-in had recently been removed from. Every time I typed at the bottom of the screen it would have a message that Intellisense was stopping but it would hang for about 30 seconds and during this time I could not run PowerShell within the environment. The problem was the cache PowerShell ISE uses to remember all the commands in each module and it will still trying to access modules that were not present and the timeout was caused by trying to find the content. The solution was to remove the cache:
Stop the PowerShell ISE
Navigate to $env:LOCALAPPDATAMicrosoftWindowsPowerShellCommandAnalysis, for example C:UsersjohnAppDataLocalMicrosoftWindowsPowerShellCommandAnalysis
Delete all the files
Restart PowerShell ISE
Note it will take some times to recache the available commands for Intellisense to function but the previous hang should be fixed.
About the Author
You May Also Like