microsoft / microsoft/winget-cli
Winget failing in Powershell 7.2.6
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Winget works with default powershell instance using 5.1 on Windows 10 professional. After installing powershell 7 I attempted running any commands including winget --version and they all fail with the same message as shown below.
edit: only happening in Admin launched prompts

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing winget --version and another Winget command in an elevated PowerShell 7.2.6 prompt, then compare them with Windows PowerShell 5.1. Inspect the error shown in the linked screenshot and verify the result after the issue's administrative-prompt condition is reproduced; done means Winget commands work in the affected prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100