1

How can I see the install scope of an already installed package, that has been previously with installed using winget?

winget install --scope machine -i -e xxxx 
not2qubit
  • 14,531
  • 8
  • 95
  • 135

1 Answers1

1

Use winget list with --scope machine, but note that you need to run from an elevated session (not necessary for --scope user)

# REQUIRES ELEVATION
winget list --scope machine
mklement0
  • 382,024
  • 64
  • 607
  • 775
  • 1
    This is requiring you to do the list operation for each scope. I was hoping to actually see the scope *somewhere*, from one command. Preferably as an added column to the list command. Or see it in the `winget show`. I accept this answer, since I don't think it's possible to do this without extensive registry research, but I think this should be an added function to the winget command. – not2qubit May 11 '23 at 13:04
  • 1
    @not2qubit, I hear you. There's now an alpha version of an [official PowerShell module](https://www.powershellgallery.com/packages/Microsoft.WinGet.Client) that wraps `winget`: `Install-Module Microsoft.WinGet.Client -AllowPrerelease` Looks like it's PSv7+ only for now, and also requires you to install the latest `winget.exe` _preview_ version. There's a [GitHub discussion](https://github.com/microsoft/winget-cli/discussions/3182) to provide feedback on the module. – mklement0 May 11 '23 at 18:44