WINGET export

Export a JSON file of apps to a specified file.

Syntax
      WINGET export [-o] OutputFile [options]

Commands:

  -o,--output  Path to the JSON file to be created.

Options

   -s, --source  [Optional] Specifies a source to export files from.
                 Use this option when you only want files from a specific source.

   --include-versions  [Optional] Includes the version of the app currently installed.
                       Use this option if you want a specific version.
                       By default, unless specified, import will use latest.

   --accept-source-agreements  Used to accept the source license agreement, and avoid the prompt.
   --verbose-logs              Used to override the logging setting and create a verbose log.

JSON schema

The driving force behind the export command is the JSON file. You can find the schema for the JSON file here.
The JSON file includes the following hierarchy:

Entry - Description
Sources - The sources application manifests come from.
Packages - The collection of packages to install.
PackageIdentifier - The Windows Package Manager package identifier used to specify the package.
Version [Optional] - The specific version of the package to install.

Exporting files

When the Windows Package Manager exports the JSON file, it attempts to export all the applications installed on the PC. If the winget export command is not able to match an application to an application from an available source, the export command will show a warning.

Matching an application depends on metadata in the manifest from a configured source, and metadata in Add / Remove Programs in Windows based on the package installer.

Examples

Export into myfiles.json:

C:\> winget.exe export -o \demo\myfiles.json

“I think Americans should have a policy of love. That should be the foreign policy, love. Export Love” ~ Ziggy Marley

Related commands

GitHub repository
WINGET - Discover, install, upgrade, remove and configure applications on Windows computers.
MSIEXEC - Microsoft Windows Installer.
WUAUCLT - Windows Update.


 
Copyright © 1999-2024 SS64.com
Some rights reserved