Command Not Found won't work
Microsoft PowerToys version
0.87.0
Installation method
WinGet
Running as admin
Yes
Area(s) with issue?
Command not found
Steps to reproduce
Simply install Powertoys and enable Command-Not-Found
✔️ Expected Behavior
something to happen
❌ Actual Behavior
It used to work with my current/unchanged Profile settings. I install every PT update so I'm not sure when it stopped working.
I open the dashboard, select Advanced, Command Not Found - Installed. All following components detected.
Open a new Powershell in terminal. Type vim (or anything not installed) - "vim: The term 'vim' is not recognized as a name of a cmdlet"
Restart computer. Try again. No change.
Uninstall Powershell 7.4.6 x64. Restart system. Reinstall (tried both Winget and msi). Uninstall CNF. Uninstall Powertoys. Restart computer.
Reinstall Powershell. Reinstall Powertoys. Reinstall CNF. Verify $PROFILE has had CNF Import-Module. Tried this whole uninstall/reinstall as both admin and not.
$PROFILE
oh-my-posh init pwsh --config 'C:\Users\XXXX\AppData\Local\Programs\oh-my-posh\themes\mineallmine.mytheme.omp.json' | Invoke-Expression Import-Module -Name Terminal-Icons
if ($host.Name -eq 'ConsoleHost') { Import-Module PSReadLine }
Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionViewStyle ListView Set-PSReadLineOption -EditMode Windows
#f45873b3-b655-43a6-b217-97c00aa0db58 PowerToys CommandNotFound module
Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58
Get-ExperimentalFeature
Name Enabled Source Description
PSCommandNotFoundSuggestion True PSEngine Recommend potential commands based on … PSCommandWithArgs False PSEngine Enable
-CommandWithArgsparameter fo… PSFeedbackProvider True PSEngine Replace the hard-coded suggestion fram… PSLoadAssemblyFromNativeCode False PSEngine Expose an API to allow assembly loadin… PSModuleAutoLoadSkipOfflineFiles False PSEngine Module discovery will skip over files … PSSubsystemPluginModel False PSEngine A plugin model for registering and un-…
Verify Dashboard says CNF installed. Powertoys works. No change CNF doesn't do anything.
I am using oh-my-posh 24.15.1 (latest).
I see other closed reports (i.e. #35666, #31250, etc) with exactly the same symptoms described and none have a resolution beyond - it eventually fixed itself or abandoned resolution attempts
Installation log_2024-12-19.zip
Other Software
No response
We've found some similar issues:
- #35666 , similarity score: 82%
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
Note: You can give me feedback by 👍 or 👎 this comment.
FWIW, I just tried another computer that is also Windows 11, fully updated as of today. Never had Powertoys on it. Installed PT, Went to CNF settings, the winget Client Powershell module was not installed. I installed it. Everything says installed/Detected.
Does nothing. Reboot. Nothing.
I'm at a loss as to what to try next. I'm not doing anything but an install and turning it on.
I got a permission issue. PowerToys always launches windows terminal with PowerShell 5 by default.
So I do these:
- Find it: "C:\Users<User>\AppData\Local\Microsoft\WindowsApps\wt.exe".
- Right-click, choose Properties → Shortcut tab → Advanced... → check Run as administrator.
- Try reopen PowerToys then install it again.
I'm having the same problem, it never works for me. PowerToys 0.95.1 on Win11 25H2 x64. PowerShell 7.5.4. I've also tried installing it having PowerToys run as admin, nothing changed.
Here are some screenshots:
The CNF page inside PT:
The installed PS modules:
An example that the feature doesn't work:
and my PowerShell profile ($PROFILE i.e. Microsoft.PowerShell_profile.ps1 ):
oh-my-posh init pwsh --config ~/ohmyposh_config.omp.json | Invoke-Expression
Import-Module -Name Terminal-Icons
#f45873b3-b655-43a6-b217-97c00aa0db58 PowerToys CommandNotFound module
Import-Module -Name Microsoft.WinGet.CommandNotFound
#f45873b3-b655-43a6-b217-97c00aa0db58