microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

`winget export` supports `--scope machine` #4942

Open lukargit opened 3 weeks ago

lukargit commented 3 weeks ago

Description of the new feature / enhancement

This request is to add a feature to allow winget export to support passing --scope machine. This would only list applications installed machine wide, and APPX packages provisioned for all users.

Proposed technical implementation details

When running winget export --scope machine -o export.json, as well as Export-WinGetPackage -Scope System, the output should only contain applications installed with scope machine. For APPX in particular, this would use the code here to call packageManager.FindProvisionedPackages() rather than packageManager.FindPackagesForUserWithPackageTypes({}, PackageTypes::Main | PackageTypes::Framework).

similar-issues-ai[bot] commented 3 weeks ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.