The term ‘winget’ is not recognized as the name of a cmdlet, function, script file, or operable program.

Publish Date: August 8, 2022

Winget does not work in Windows

Windows package manager (or winget) is a latest package manager for Windows (just like apt and dnf in Linux) that only works in the modern version of Windows 10 1809 (build 17763) or Windows 11. To use winget, make sure you install it using Microsoft Store app. Just open Run dialog and type "ms-windows-store:" without quotes and press Enter. Search for "winget" or "App Installer" without quotes and make sure it is installed.

App Installer in Microsoft Store
App Installer in Microsoft Store

If you still get The term ‘winget’ is not recognized as the name of a cmdlet, function, script file, or operable program error as shown in the screenshot, see Fixing the Winget Error section to resolve it.

The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program
The term ‘winget’ is not recognized as the name of a cmdlet, function, script file, or operable program

Fixing the Winget Error

If you’re getting the error as shown in the screenshot, follow these steps:

  • Make sure you have installed the winget package on your system.
  • Open Run dialog and type sysdm.cpl ,3 and press Enter. This will open Advanced System Properties.
  • Now click on Environment Variables button.
    Modifying Environment Variables
    Modifying Environment Variables
  • Under User Variables section, double click Path variable to edit it.
    Modifying Path User Variable
    Modifying Path User Variable
  • Now click New button and paste the following line and click OK.
    %UserProfile%\AppData\Local\Microsoft\WindowsApps

    Adding environment variable for winget
    Adding environment variable for winget
  • Click OK once again. Now close the current PowerShell console or command prompt and try running winget again. It should now work without any error.

    Winget command overview
    Winget command overview


Microsoft Certified | Cisco Certified

8 Comments

Leave a Reply