News

Microsoft PowerToys Getting New PowerShell Module

Microsoft is polishing up a new PowerToys utility to improve the user experience on PowerShell in Windows 10 and 11 by suggesting installations of missing components through WinGet packages.

Teased last week in a social media post by Microsoft's Clint Rutkas, the new PowerToy is called "Command Not Found."

"Final touches on a new PowerToy, Command Not Found. We are ironing out the install process now to get everything properly wired up for you all. It is off by default as it requires PowerShell 7.4," said Rutkas, lead for the developer experience for PowerToys.

Command Not Found Post
[Click on image for larger view.] Command Not Found (source: X).

A GitHub pull request, Introduce Command Not Found module #26319, says it: "Introduces a new PowerToy that adds the ability to detect failed commands in PowerShell and suggest a package to install using winget. This PowerToy is powered by a PowerShell module that leverages the new feedback subsystem."

While not a development offering per se, Microsoft PowerToys provides a set of utilities for power users to tune and streamline their Windows experience for greater productivity, including developers who often find themselves needing to use PowerShell.

Current PowerToy Utilities
[Click on image for larger view.] Current PowerToy Utilities (source: GitHub).

As the above screenshot illustrates, PowerToys currently includes 24 separate toys, and its GitHub site now lists the "Command Not Found" toy, but the item link goes to a page not found message. That means not much more information on it is available beyond the social media post by Rutkas, which garnered more than 18,000 views, 148 likes and eight comments.

Other tidbits of information provided by Rutkas in the comment thread include:

  • Comment: This is good to see as a default but I'd also like this to be configurable to shell out to other package managers like @chocolateynuget or others that are used in orgs like SCCM Software Centre as another example so will raise an issue for this if there isn't already one
    Rutkas Reply: How it is being built out, would be super easy for Choco or others to build their own modeling the same pattern
  • Comment: Is it extensible? How does it integrate with powrshell? I wrote the original Ubuntu version all those years ago.
    Rutkas Reply: It uses the feedback api in powershell 7.4. Nothing stopping someone from using ours as a base to build out something custom or do a PR into powertoys.
  • Comment: I wish I could trust that this wont be abused to spread malware or to install its dependencies. Other than that, I like this idea.
    Rutkas Reply: You have to enable the feature + install deps. You see the fully qualified IDs too. same pattern as existing winget search Foo pattern for output + fully qualified ID that you can verify: winget show Microsoft.VisualStudioCode

The new toy is in the works for v0.77, whose work is being carried out here. The full list of work items includes:

  • New utility: Command Not Found
  • Language selection
  • Automated UI testing through WinAppDriver
  • Develop support for Desired State Configuration
  • Modernize and refresh the UX of PowerToys based on WPF.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube