PowerShell IntelliSense used to respond quickly, but it has gradually become slow and often times out. I have to press Tab, wait for the timeout, and then press Tab again before completion works. I have already cleared prompt history, removed unused modules, and tried several other suggested fixes without success. The issue occurs mostly with Windows PowerShell 5.1. What are the most effective ways to diagnose and speed it up?
4 Answers
First, try working from a small, local directory rather than a large or heavily synced one. PowerShell checks the current directory while completing paths, parameter values, and commands. If you are running as administrator from the Windows system directory, completion may be scanning a huge number of entries on every trigger. Also reduce the number of installed module versions and remove large module suites you do not actually use; Azure, Graph, and VMware modules can add a lot of commands to the completion search.
If you need many administrative modules installed, disable automatic module loading in your PowerShell profile. Load a module explicitly only when you need its commands. This avoids IntelliSense repeatedly inspecting a large collection of modules just to build completion results.
Check whether your PowerShell profile folders are being synchronized by OneDrive or another cloud-storage client. Make sure the PowerShell directories are stored locally and marked as always available on the device. Sync delays and file-provider checks can make completion noticeably slower.
Corporate policies may also be involved, especially on machines joined to an Active Directory domain. Group policies, security scanning, or redirected profile folders can add delays when PowerShell examines modules and filesystem paths. Comparing the behavior on a standalone machine or in a clean profile can help determine whether the slowdown is policy-related.

It is worth measuring completion directly with TabExpansion2. On some systems, even a fast machine can take several hundred milliseconds in a large directory, while slower systems may take multiple seconds.