Quick answer: winget comes with Microsoft’s App Installer app, so this error means App Installer is missing, outdated or not registered for your account, or the winget.exe shortcut is switched off. Open PowerShell and run Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe, then open a new window. If that doesn’t help, check App execution aliases in Settings and update App Installer from the Microsoft Store.
In this guide
- Why Windows can’t find winget
- Check what’s missing
- Fix 1: Register App Installer
- Fix 2: Turn on the app execution alias
- Fix 3: Add the WindowsApps folder to PATH
- Fix 4: Different user or admin account
- Fix 5: Reset or repair App Installer
- Fix 6: Update or reinstall App Installer
- Sandbox, LTSC, Server and SYSTEM
- Related guides
Why Windows can’t find winget
In Command Prompt the error reads ‘winget’ is not recognized as an internal or external command, operable program or batch file. PowerShell says The term ‘winget’ is not recognized as the name of a cmdlet, function, script file, or operable program. Both mean Windows couldn’t find a winget.exe it can run.
According to Microsoft Learn, winget (Windows Package Manager) is part of App Installer, a system component the Microsoft Store installs and updates on Windows 10 version 1809 or later and Windows 11. It’s a packaged app, registered separately for each user, and it reaches the command line through a small alias file in your WindowsApps folder. If any link in that chain is broken, you get this error.
Check what’s missing
Open PowerShell (not as administrator for now) and run:
Get-AppxPackage Microsoft.DesktopAppInstaller | Select Name, Version
If nothing comes back, App Installer isn’t installed for your account; go to Fix 1 and then Fix 6. If it shows a version, try running winget by its full alias path:
& "$env:LOCALAPPDATA\Microsoft\WindowsApps\winget.exe" --version
Microsoft’s troubleshooting notes say that if this works while plain winget doesn’t, your PATH is missing the folder (Fix 3). If the file isn’t there, the alias is off or the app isn’t registered (Fixes 1, 2 and 4).
Fix 1: Register App Installer
Microsoft notes that winget isn’t available until you’ve signed in to Windows for the first time and the Store has finished registering it in the background. On a new PC or a new account, or if registration simply didn’t finish, run this in PowerShell:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Close the window, open a new one and run winget --version.
Fix 2: Turn on the app execution alias
The alias is what lets you type winget anywhere. On Windows 11 go to Settings > Apps > Advanced app settings > App execution aliases; on Windows 10, Settings > Apps > Apps & features > App execution aliases. Find Windows Package Manager Client (winget.exe) and turn it on. If it’s already on, turn it off and on again, then open a new terminal.
Fix 3: Add the WindowsApps folder to PATH
- Press Win + R, type
sysdm.cpl, open the Advanced tab and select Environment Variables. - Under User variables, select Path and choose Edit.
- If it’s not already listed, select New and add
%LOCALAPPDATA%\Microsoft\WindowsApps. Don’t delete or overwrite the existing entries. - Select OK three times, then open a new terminal window.
Some guides print this path with a missing %, which silently doesn’t work, so copy it exactly.
Fix 4: Different user or admin account
Because App Installer is registered per user, winget can work in your normal account but not when you use Run as administrator with a different admin account, or under another user. Sign in as that account and run Fix 1 there. Microsoft’s GitHub notes also give this alternative, run in PowerShell as the affected user:
$p = (Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation
Add-AppxPackage -DisableDevelopmentMode -Register "$p\appxmanifest.xml"
Opening an elevated window as your own admin account normally works. If you need help with that, see how to open Command Prompt as administrator.
Fix 5: Reset or repair App Installer
On Windows 11 you can reset the package without affecting other apps:
Get-AppxPackage Microsoft.DesktopAppInstaller | Reset-AppxPackage
Microsoft’s troubleshooting page also has a one-step repair that downloads and fixes winget and its dependencies through the official PowerShell module. Run it in PowerShell as administrator:
Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager -Force -Latest
Open a new terminal afterwards and test again.
Fix 6: Update or reinstall App Installer
Old App Installer versions don’t include winget. Open the App Installer page in the Microsoft Store and select Update or Get. If the Store itself is missing, see how to get the Microsoft Store back.
Without the Store, download the latest .msixbundle only from the official winget-cli releases page on GitHub and double-click it to install. Avoid repackaged “winget installers” on other sites. A manual install won’t update itself through the Store, and on older Windows 10 builds you may also need the dependency packages that Microsoft lists, so the Repair command in Fix 5 is usually easier.
Sandbox, LTSC, Server and SYSTEM
| Where you’re running it | What Microsoft says |
|---|---|
| Windows Sandbox | Doesn’t include winget or the Store. Use the Repair-WinGetPackageManager steps in Fix 5 (Microsoft’s Sandbox example adds -AllUsers). |
| Windows 10/11 LTSC or IoT Enterprise | No Microsoft Store. Install the GitHub package plus its VCLibs and UI.Xaml dependencies, as Microsoft’s IoT guide describes. |
| Windows Server 2025 | Supported; App Installer arrives through Windows Update. |
| Windows Server 2019/2022 | Experimental and unsupported; Server Core isn’t supported. |
| SYSTEM account (Intune, scheduled tasks) | The winget command isn’t supported as SYSTEM because packaged apps can’t register for it. Use the Microsoft.WinGet.Client PowerShell module instead. |
On work PCs, policies can block the Store or winget. Run winget --info where it works to see applied policies, and ask IT before changing them. Once winget runs, you can also use it for updates alongside Windows Update from the command line.
Related guides
- Microsoft Store missing in Windows 11 or 10? How to get it back
- How to open Command Prompt as administrator in Windows 11 and 10
- Windows Update from the Command Line: CMD and PowerShell Commands
- “wmic is not recognized” in Windows 11: why WMIC is gone and what to use instead
Leave a Reply