sodcalculator

10 Tech How-To

Fix Winget Not Recognized: 7 Quick Steps

Guide 10-51696 · Updated · Step by step

If you see “winget is not recognized as an internal or external command” when trying to install software from the command line, the fix is usually to update your Windows App Installer or check your PATH environment variable. Below are the exact steps to resolve this on Windows 10 and Windows 11, along with background on what winget is and why it fails.

What Is Winget and Why Does It Matter?

Winget is the Windows Package Manager, a command-line tool that lets you install, upgrade, and remove software by typing simple commands like winget install firefox. It was introduced by Microsoft in 2020 and ships as part of the App Installer package from the Microsoft Store. Unlike downloading an installer from a website, winget checks the official repository and handles updates automatically, which makes it popular for scripting and bulk setup.

The “not recognized” error means Windows cannot find the winget.exe file. This happens when the App Installer is missing, outdated, or its folder is not in the system’s PATH. The tool is not a separate download; it is bundled with App Installer, which is preinstalled on most modern Windows 10 (version 1809+) and Windows 11 systems. However, some enterprise images, debloated installations, or older builds do not have it.

Step 1: Check Your Windows Version

Winget requires Windows 10 version 1809 or later, or Windows 11. To check your version:

  1. Press Win + R, type winver, and press Enter.
  2. Look at the “Version” line. If it is 1809 or higher, winget should be available.
  3. If you are on an older version, update Windows first, then retry winget.

Most “not recognized” errors on up-to-date systems are not due to the OS version, but to the App Installer package being outdated or corrupted.

Step 2: Update App Installer from the Microsoft Store

The most common fix is to update the App Installer app. Microsoft releases winget updates through the Store, and older versions may not be recognized by the command line.

  1. Open the Microsoft Store.
  2. Click the Library icon (bottom left) and then Get updates.
  3. Look for App Installer in the list. If an update is available, install it.
  4. Restart your terminal (Command Prompt or PowerShell) and try winget --version.

If the Store does not show App Installer, you can also install it from the official Microsoft Store page in a browser, which will redirect to the Store app. This method works even if the Store app itself is broken, as long as the Store service is running.

Step 3: Install App Installer via PowerShell

If the Store method fails, you can install the latest App Installer package directly from Microsoft’s servers using PowerShell. This is a safe, official method.

  1. Open PowerShell as Administrator (right-click Start, then “Windows Terminal (Admin)” or “Windows PowerShell (Admin)”).
  2. Run the following command to download and install the package:
Invoke-WebRequest -Uri "https://aka.ms/getwinget" -OutFile "winget.appxbundle"
Add-AppxPackage -Path "winget.appxbundle"

The aka.ms/getwinget link always points to the latest stable App Installer. After the command completes, close and reopen your terminal, then test with winget --version. If you see a version number, the fix worked.

Step 4: Add Winget to PATH Manually

If winget is installed but still not recognized, the PATH environment variable may be missing the folder that contains winget.exe. The default location is:

%LOCALAPPDATA%\Microsoft\WindowsApps

To add it:

  1. Press Win + R, type sysdm.cpl, and press Enter.
  2. Go to the Advanced tab and click Environment Variables.
  3. Under “User variables”, select Path and click Edit.
  4. Click New, paste %LOCALAPPDATA%\Microsoft\WindowsApps, and press Enter.
  5. Click OK on all windows, then restart your terminal.

Note that this folder also contains other Windows app execution aliases, so adding it is safe. If the path is already there, the issue is likely that the App Installer package is not installed at all.

Step 5: Check Execution Policy and Alias Conflicts

Sometimes the error comes from PowerShell’s execution policy blocking the command, or from a conflicting alias. If you are using PowerShell, try running winget from Command Prompt instead. If it works there, the problem is PowerShell-specific.

  • Check if an alias is overriding winget: run Get-Command winget in PowerShell. If it shows an alias, remove it with Remove-Item alias:winget.
  • If execution policy is the issue, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned (you may need admin rights). This is a common fix for scripts, but winget itself is a native executable, so this is rarely the cause.

Another common conflict is having a third-party package manager like Chocolatey or Scoop that creates a different winget alias. Check your PATH order to ensure the WindowsApps folder comes before any other package manager directories.

Step 6: Repair or Reinstall App Installer

If winget is installed but still not recognized, the package may be corrupted. You can reset it through Settings:

  1. Open Settings > Apps > Installed apps.
  2. Search for App Installer.
  3. Click the three-dot menu and choose Advanced options.
  4. Click Repair. If that does not work, click Reset (this will clear winget’s settings and cache).

After a reset, you will need to re-accept any agreements, but your installed software list is not affected. This is a good last resort before reinstalling Windows.

Frequently Asked Questions

Why does winget say “not recognized” even though I just installed it?

This usually means the terminal session was opened before the installation finished, or the PATH was not refreshed. Close all Command Prompt/PowerShell windows and reopen them. If it still fails, check that the App Installer package is actually installed by looking in Settings > Apps.

Can I use winget on Windows 10 Home?

Yes, winget works on Windows 10 Home as long as the version is 1809 or later. There is no edition restriction; it is available on Home, Pro, Enterprise, and Education. If it is missing, it is because the App Installer package is not installed, not because of the edition.

Is winget safe to use?

Winget only installs software from the official Microsoft repository or from sources you explicitly add. It does not download random executables. However, like any package manager, you should review the source before installing, especially if you add third-party repositories. Stick to the default “winget” source for safety.

What is the difference between winget and the Microsoft Store?

The Microsoft Store is a graphical app that installs UWP and MSIX apps. Winget is a command-line tool that can install both Store apps and traditional Win32 programs (like Firefox or 7-Zip). Winget also supports batch installation and scripting, which the Store does not.

Will updating App Installer break my existing winget commands?

No. Updates are backward compatible. Your existing installed software and sources remain intact. The only change is the winget executable version, which usually adds new features or fixes bugs. If a command syntax changes, the help file (winget --help) will show the new options.

Can I use winget without admin rights?

Yes, for most user-scope installs. Winget can install software to your user profile without elevation. However, some apps require admin rights to install system-wide. If you see an error about elevation, run the command from an elevated terminal.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →