Table of Contents
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. Search for App Installer and make sure it is installed.
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.
If you’re getting the error as shown in the screenshot, follow these steps:
1️⃣ Make sure you have installed the winget package on your system.
2️⃣ Search then open the system environment variables..
3️⃣ Now click on Environment Variables button.
4️⃣ Under User Variables section, double click Path variable to edit it.
5️⃣ Now click New button and paste the following line and click OK.
%UserProfile%\AppData\Local\Microsoft\WindowsApps
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.
Update winget on Windows
If the error still persistent after do above steps. You can try to update App Installer and all its dependencies packages using the following PowerShell command:
irm https://bonguides.com/winget | iex
#Output
PS C:\Windows\system32> irm https://bonguides.com/winget | iex
Installing Nuget...
Installing Windows Package Manager...
Installed packages:
DisplayName Version
----------- -------
Microsoft.DesktopAppInstaller 2023.707.2257.0
Restart your computer then Windows Package Manager should be worked without any issue.