PowerShell is very popular among system administrators. Despite the fact that it is developed by Microsoft and is widely available, a major drawback of using Windows PowerShell is that its autocomplete function suddenly stops working at times.
Plenty of users have been reporting this problem on forums:
Lately after my latest update of Windows 10 my PowerShell ISE stopped giving me the little popup that autocompletes commands … I used to click on “ctrl + space” to see the little popup but it’s not working anymore instead it gives me an error “an unexpected error has occurred and Windows PowerShell ISE must close”.
If you discovered that PowerShell’s autocomplete is not working for you either, there are several steps that you can take to make things right again.
What can I do when PowerShell autocomplete is not working?
1. Make sure IntelliSense Complete Word is invoked
Go to the Edit menu and click Start Snippets. Hit Start IntelliSense, if it happens not to be set this way anymore.
IntelliSense is a code-completion aid that includes a number of useful features. Complete Word is one of them and can be easily invoked by entering into Edit > IntelliSense > Complete Word, or by choosing the Complete Word button on the editor toolbar.
After that, it should start completing the rest of a variable, command, or function name after entering enough characters to disambiguate the term.
2. Install PowerShell ISE Preview
ISE Preview has fixed this issue, so you can try to install it as well. This module is distributed via the PowerShell Gallery. That’s why the Install-Module cmdlet – which is part of the PowerShellGet module – is used to install the ISE preview module from the PowerShell Gallery.
There is also a Scope parameter if you’d rather install the module only for the current user and not in the all users path:
Install-Module -Name PowerShellISE-preview
Up next, the Install-ISEPreviewShortcut cmdlet creates shortcuts in the Start menu for the ISE preview:
Finally, in order to launch the Windows PowerShell ISE Preview edition, type isep #.
3. Try using VSCode
You could also consider using VSCode. Visual Studio Code is notorious for its usability for PowerShell. The reason is really simple: it’s not only much more powerful than PowerShell IDE but also gives a sense of freshness.
Just don’t forget to configure your VSCode environment to make PowerShell the default language. If you look in the right-hand corner of the editor, it will tell you what language is currently set to.
Moreover, some users state that this only happens on their Windows 7 computer while being on a different location. PowerShell autocomplete always works while used on their Windows 10 PC at home, so it may be a Windows 7 related issue.
In that regard, it’s a great time to migrate to Windows 10.
Did our solutions work for you? How do you solve problems such as this one? If you’re aware of another fix, share it in the comments section below so that other users can try it as well.
- Run this Powershell script to remove default apps from Windows 10 Image
- Windows PowerShell has stopped working: Try these 4 fixes
- PowerShell is not recognized? Check out these solutions