Repository: PowerToys
Issue: Command Not Found won't work
Labels: Issue-Bug,Needs-Triage,Product-CommandNotFound

### 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 `-CommandWithArgs` parameter 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

[log_2024-12-19.zip](https://github.com/user-attachments/files/18194801/log_2024-12-19.zip)

[Installation log_2024-12-19.zip](https://github.com/user-attachments/files/18195037/Installation.log_2024-12-19.zip)


### Other Software

_No response_