{"id":9974,"date":"2024-05-21T08:35:53","date_gmt":"2024-05-21T15:35:53","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/commandline\/?p=9974"},"modified":"2024-05-21T08:40:24","modified_gmt":"2024-05-21T15:40:24","slug":"winget-commandnotfound","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/commandline\/winget-commandnotfound\/","title":{"rendered":"WinGet.CommandNotFound"},"content":{"rendered":"<p>We are pleased to announce the release of <code>WinGet.CommandNotFound<\/code>! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions.<\/p>\n<p>This module was originally incubated as a utility in <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/powertoys\/cmd-not-found\">PowerToys<\/a>. Thanks to the help of the PowerShell and PowerToys community, we got lots of positive feedback to turn this PowerToys utility into a real PowerShell module! \ud83d\ude42<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound.png\" alt=\"Image of Microsoft WinGet CommandNotFound\" width=\"1865\" height=\"587\" class=\"size-full wp-image-9977\" srcset=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound.png 1865w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound-300x94.png 300w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound-1024x322.png 1024w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound-768x242.png 768w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2024\/05\/Microsoft.WinGet.CommandNotFound-1536x483.png 1536w\" sizes=\"(max-width: 1865px) 100vw, 1865px\" \/><\/a><\/p>\n<h2>Requirements<\/h2>\n<p>The <code>Microsoft.WinGet.CommandNotFound<\/code> module is built on the <code>IFeedbackProvider<\/code> interface, which is available with PowerShell 7.4.0-preview.2 or above. To display prediction suggestions, you need <a href=\"https:\/\/www.powershellgallery.com\/packages\/PSReadLine\/2.2.6\">PSReadLine 2.2.6<\/a> or above.<\/p>\n<p>You will also need <code>Microsoft.WinGet.Client<\/code> version 1.8.1133 or higher to receive suggestions.<\/p>\n<p>If <code>PSFeedbackProvider<\/code> and <code>PSCommandNotFoundSuggestion<\/code> are not yet enabled, then you can run the following commands in PowerShell:<\/p>\n<pre><code>Enable-ExperimentalFeature PSFeedbackProvider\nEnable-ExperimentalFeature PSCommandNotFoundSuggestion\n<\/code><\/pre>\n<p>You will only need to run these commands once and they will enable <code>PSFeedbackProvider<\/code> and <code>PSCommandNotFoundSuggestion<\/code> in your next session.<\/p>\n<h2>Installation<\/h2>\n<p>To install the WinGet CommandNotFound module, enter the following in PowerShell 7.4+:<\/p>\n<pre><code>Install-PSResource -Name Microsoft.WinGet.CommandNotFound\n<\/code><\/pre>\n<h2>Setup<\/h2>\n<p>To load this module whenever a PowerShell session loads, you will need to add the following to your PowerShell profile:<\/p>\n<pre><code>Import-Module Microsoft.WinGet.CommandNotFound\n<\/code><\/pre>\n<p>You can enter <code>code $profile<\/code> or <code>notepad $profile<\/code> in PowerShell to open up your PowerShell profile in Visual Studio Code or Notepad respectively.<\/p>\n<h2>Thank you!<\/h2>\n<p>We would like to give a huge thanks to everyone that helped us incubate this feature in PowerToys and the PowerShell team for helping us push this to the PowerShell Gallery.<\/p>\n<p>This module is also open-source so if you find any bugs or have an idea for a feature suggestion, then please visit <a href=\"https:\/\/github.com\/microsoft\/winget-command-not-found\">https:\/\/github.com\/microsoft\/winget-command-not-found<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions. [&hellip;]<\/p>\n","protected":false},"author":101092,"featured_media":9977,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10,1,2,1535,1728,6,1577,782],"tags":[],"class_list":["post-9974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cmd","category-commandline","category-command-line","category-open-source","category-windows","category-windows-console","category-windows-package-manager","category-windows-terminal"],"acf":[],"blog_post_summary":"<p>We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/9974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/users\/101092"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/comments?post=9974"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/9974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media\/9977"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media?parent=9974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/categories?post=9974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/tags?post=9974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}