ExportCollections

<< Click to Display Table of Contents >>

ExportCollections

Exports one or more PDQ Inventory collections to XML files. Use this command to back up collection definitions or synchronize collections between isolated or air-gapped environments.

Syntax

PDQInventory ExportCollections -Name <collection> [,<collection> ...] -Path <path> [-Overwrite]

PDQInventory ExportCollections -All -Path <path> [-Overwrite]

Parameters

Parameter

Required

Description

-Name <collection> ...

Yes*

One or more collection names to export, comma-separated. Supports wildcard patterns (e.g., Windows*). Required unless -All is specified.

-All

Yes*

Exports all collections. Cannot be combined with -Name.

-Path <path>

Yes

Output file path or directory. When exporting a single collection, this can be a full file path (e.g., C:\Exports\Windows10.xml) or a directory. When exporting multiple collections, this must be a directory.

-Overwrite

No

Overwrites existing output files without prompting.

* Either -Name or -All is required, but they cannot be used together.

Exit Codes

Exit Code

Meaning

0

Command completed successfully.

1

One or more collections failed to export.

2

User cancelled at the overwrite confirmation prompt.

3

No collections found matching the specified name(s).

4

One or more collections were skipped because output files already exist. Use -Overwrite to replace existing files.

Examples

Export a single collection to a directory:

PDQInventory ExportCollections -Name "Windows 10" -Path C:\Exports

Export a single collection to a specific file:

PDQInventory ExportCollections -Name "Windows 10" -Path C:\Exports\Windows10.xml

Export all collections whose names start with "Windows":

PDQInventory ExportCollections -Name "Windows*" -Path C:\Exports

Export multiple named collections:

PDQInventory ExportCollections -Name "Windows 10","Servers" -Path C:\Exports

Export all collections and overwrite any existing files:

PDQInventory ExportCollections -All -Path C:\Exports -Overwrite

NOTE: Each export includes the full collection hierarchy - child collections are embedded in their parent's export file. Exported files can be imported using the ImportCollections command.

 

 

 

© 2026 PDQ.com Corporation. All rights reserved.

PDQ.com is a trademark of PDQ.com Corporation. All other product and company names are the property of their respective owners.

Help Version: 20.0.22.0