export.md (3374B)
1 --- 2 title: export Command 3 description: exports the list of installed applications. 4 ms.date: 05/02/2021 5 ms.topic: overview 6 ms.localizationpriority: medium 7 --- 8 9 # export command (winget) 10 11 The **export** command of the [winget](index.md) tool exports a JSON file of apps to a specified file. The **export** command users JSON as the format. See [the JSON schema used by **winget**](https://aka.ms/winget-packages.schema.1.0.json). 12 13 The **export** combined with the [**import**](import.md) command allows you to batch install applications on your PC. 14 15 The **export** command is often used to create a file that you can share with other developers, or for use when restoring your build environment. 16 17 ## Usage 18 19 `winget export [-o] <output> [<options>]` 20 21  22 23 ## Arguments 24 25 The following arguments are available. 26 | Argument | Description | 27 |-------------|-------------| 28 | **-o,--output** | Path to the JSON file to be created 29 30 ## Options 31 32 The options allow you to customize the export experience to meet your needs. 33 34 | Option | Description | 35 |--------|-------------| 36 | **-s, --source** | [optional] Specifies a source to export files from. Use this option when you only want files from a specific source. | 37 | **--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**](import.md) will use latest. | 38 | **--accept-source-agreements** | Accept all source agreements during source operations | 39 | **-?, --help** | Shows help about the selected command | 40 | **--wait** | Prompts the user to press any key before exiting | 41 | **--logs, --open-logs** | Open the default logs location | 42 | **--verbose, --verbose-logs** | Enables verbose logging for winget | 43 | **--disable-interactivity** | Disable interactive prompts | 44 45 ## JSON Schema 46 The driving force behind the **export** command is the JSON file. As mentioned, you can see the [schema for the JSON file](https://aka.ms/winget-packages.schema.1.0.json). 47 48 The JSON file includes the following hierarchy: 49 | Entry | Description | 50 |-------------|-------------| 51 | **Sources** | The sources application manifests come from. | 52 | **Packages** | The collection of packages to install. | 53 | **PackageIdentifier** | The Windows Package Manager package identifier used to specify the package. | 54 | **Version** | [Optional] The specific version of the package to install. | 55 56 ## exporting files 57 58 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. 59 60 Note: 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. 61 62 In the example below, you will see warnings for **WhatsApp Desktop** and **7-Zip**. 63 64  65 66 Once the export is complete, you can edit the resulting JSON file in your favorite editor. You can remove apps you do not wish to import in the future. 67 68 ## Related topics 69 70 * [Use the winget tool to install and manage applications](index.md) 71