winget Not Recognized? 4 Fixes That Work on Windows 11

If you type a winget command and get winget not recognized (in Command Prompt: ‘winget’ is not recognized as an internal or external command; in PowerShell: The term ‘winget’ is not recognized), Windows can’t find the Windows Package Manager. winget ships inside the App Installer app, so the fix is almost always one of four things: App Installer is old or missing, its command alias is switched off, the WindowsApps folder dropped out of your PATH, or the package needs re-registering. This guide goes through them easiest first.

Tested on Windows 11 25H2 · winget v1.29.380

Quick fix

  1. Close every Command Prompt, PowerShell and Terminal window, then open a new one and try winget --version.
  2. Update App Installer in the Microsoft Store (search “App Installer” and select Update or Get).
  3. Go to Settings > Apps > Advanced app settings > App execution aliases and turn on Windows Package Manager Client (winget.exe).
  4. Still nothing? Re-register App Installer with one PowerShell command (Fix 4).

Why the winget not recognized error happens

winget isn’t a normal program in a folder like C:\Program Files. It’s a packaged app that Windows exposes through an app execution alias: a small winget.exe stub in %LOCALAPPDATA%\Microsoft\WindowsApps, a folder that sits on your user PATH. If any link in that chain breaks, the shell can’t find the command.

  • App Installer is missing or out of date. winget needs Windows 10 version 1809 or later, and Microsoft’s troubleshooting notes ask for App Installer newer than 1.11.11451.
  • First sign-in on a new PC or new user. The Microsoft Store registers winget in the background after your first sign-in, so it can be missing for a while.
  • The alias is turned off in App execution aliases.
  • The WindowsApps folder isn’t on your PATH, often after a tool or script rewrote the Path variable.
  • You’re running as SYSTEM (for example from a scheduled task or a management tool). Microsoft says the winget command line isn’t supported in the system context.

Before you start, check what’s actually there. In PowerShell, run:

Get-AppxPackage Microsoft.DesktopAppInstaller

If this returns nothing, App Installer isn’t installed for your account: go to Fix 1. If it shows a Version, App Installer is there and the problem is the alias, PATH or registration.

Get-AppxPackage output in PowerShell confirming App Installer is installed when winget not recognized
Get-AppxPackage shows App Installer’s Version and Status. If it returns nothing, go to Fix 1.

Fix 1: Update or install App Installer

winget is delivered and updated with App Installer through the Microsoft Store.

  1. Open the Microsoft Store and search for App Installer (publisher Microsoft Corporation).
  2. If it doesn’t show up in search (it didn’t on my PC), open its Store page directly: App Installer on the Microsoft Store.
  3. Select Update if it’s offered, or Get if it isn’t installed.
  4. Close all terminal windows, open a new one and run winget --version.

No Microsoft Store on the PC (some work or LTSC builds)? Microsoft offers a direct download of the latest App Installer at aka.ms/getwinget. Run the downloaded .msixbundle file and select Update or Install. On a managed work PC, IT may block winget on purpose, so check with them first.

Fix 2: Turn on the winget app execution alias

If App Installer is installed but the alias is off, typing winget goes nowhere.

  1. Open Settings (Windows key + I).
  2. Go to Apps > Advanced app settings > App execution aliases.
  3. Find Windows Package Manager Client (with winget.exe under it) and turn it On.
  4. If it was already on, turn it off and back on. Microsoft’s troubleshooting notes suggest this to reset the alias.
  5. Open a new terminal window and run winget --version.
App execution aliases in Windows 11 Settings with Windows Package Manager Client winget.exe turned On
The winget alias is listed as Windows Package Manager Client (winget.exe).

Fix 3: Add the WindowsApps folder to PATH

First, test whether PATH is the problem by calling winget by its full path. In Command Prompt:

%LOCALAPPDATA%\Microsoft\WindowsApps\winget

Or in PowerShell:

& "$env:LOCALAPPDATA\Microsoft\WindowsApps\winget"

If winget runs this way but not when you type just winget, the folder is missing from your PATH. Add it back:

  1. Select Start, type environment variables and open Edit environment variables for your account.
  2. Under User variables, select Path and then Edit.
  3. Select New and enter %USERPROFILE%\AppData\Local\Microsoft\WindowsApps.
  4. Select OK on both windows, then open a new terminal window.

Careful: only add a line. Don’t delete or edit the other entries in Path, or other programs may stop working from the command line. If you want a backup first, copy each entry into a text file before you change anything.

Edit environment variable window with the WindowsApps folder added to the user Path
The WindowsApps line in the user Path (Windows shows %USERPROFILE% as the full folder path).

Fix 4: Re-register or repair winget with PowerShell

If App Installer is installed and the alias is on, the package registration for your account may be broken. This command from Microsoft asks Windows to register winget again. Run it in PowerShell (no admin needed):

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

It finishes without a message. Close PowerShell, open a new window and run winget --version. Sign out and back in if it still isn’t found.

If that doesn’t help, Microsoft’s troubleshooting page has a repair that downloads the WinGet PowerShell module and reinstalls the client. Run PowerShell as administrator and enter:

Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager -Force -Latest

The first line installs the NuGet provider PowerShell needs to download modules, the second installs Microsoft’s Microsoft.WinGet.Client module from the PowerShell Gallery, and the third reinstalls the latest winget. If PowerShell asks whether to trust the gallery, answer Y.

If winget is still not recognized

  • Restart the PC. A fresh sign-in reloads PATH and finishes any pending Store registration.
  • Check your Windows version. Press Windows key + R, type winver and press Enter. winget needs Windows 10 version 1809 (build 17763) or later.
  • Try another user account. If winget works there, the problem is your profile’s registration or PATH, so repeat Fix 3 and Fix 4 on your account.
  • Running it from a script or scheduled task? Run the task as your user, not SYSTEM, or use the Microsoft.WinGet.Client PowerShell module instead.

When it works, winget --version (or the short form winget -v) prints a version number such as v1.29.380.

PowerShell running winget -v and returning version v1.29.380
Fixed: winget -v prints the version number.

Questions people ask

Why does winget work in PowerShell but not in Command Prompt (or the other way round)?

Both use the same PATH, so the usual cause is a window that was open before you fixed things. Close every terminal window and open a new one. If only one still fails, restart the PC.

Do I need admin rights to fix winget?

No for Fixes 1 to 3 and the re-register command in Fix 4. The Repair-WinGetPackageManager steps need PowerShell run as administrator.

Is winget built into Windows 11?

Yes. It comes with the App Installer app, which the Microsoft Store installs and updates. If App Installer was removed, reinstall it from the Store.

How do I check which winget version I have?

Run winget –version. To see the App Installer version, run (Get-AppxPackage Microsoft.DesktopAppInstaller).Version in PowerShell.

Sources: Microsoft Learn: Use WinGet to install and manage applications · Microsoft Learn: Debugging and troubleshooting issues with the WinGet tool · Microsoft Learn: Installing the App Installer · winget-cli on GitHub: troubleshooting

Similar Posts