<< Click to Display Table of Contents >> ImportPackages |
Imports one or more package definitions from XML files. This enables synchronization of packages between isolated networks, restoration of package backups, and automated deployment of standardized packages across multiple PDQ Deploy instances.
By default, if a package with the same name already exists, a new package is created with a unique name (e.g., "Package Name (2)"). Use -Overwrite to replace existing packages or -SkipExisting to skip them.
PDQDeploy ImportPackages -Path <inputPath> [-Overwrite] [-SkipExisting]
Parameter |
Required |
Description |
|---|---|---|
-Path |
Yes |
Path to an XML file or a directory containing import files. When a directory is specified, all supported import files (.xml, .pdqi, .pdqinstaller, .pdqdld, .pdqpkg) in that directory are imported. |
-Overwrite |
No |
Replace existing packages (matched by name) with the imported definitions. Without this flag, duplicate names receive a numeric suffix. |
-SkipExisting |
No |
Skip packages that already exist (by name) instead of creating duplicates. Skipped packages are listed in the output. |
Exit Code |
Meaning |
|---|---|
0 |
All packages were imported successfully. |
1 |
One or more packages failed to import. |
3 |
No importable files found at the specified path. |
Import a single package file:
PDQDeploy ImportPackages -Path C:\Exports\AdobeReader.xml
Import all package files from a directory:
PDQDeploy ImportPackages -Path C:\Exports
Import and overwrite existing packages:
PDQDeploy ImportPackages -Path C:\Exports -Overwrite
Import and skip packages that already exist:
PDQDeploy ImportPackages -Path C:\Exports -SkipExisting
Check the exit code in a PowerShell script:
PDQDeploy ImportPackages -Path C:\Exports\AdobeReader.xml
if ($LASTEXITCODE -eq 0) {
Write-Host "Import completed successfully."
} elseif ($LASTEXITCODE -eq 3) {
Write-Host "No importable files found."
} else {
Write-Warning "Import failed with exit code $LASTEXITCODE"
}
NOTE: Importing packages requires the "Modify Packages" RBAC permission. Package imports are recorded in the audit log when audit logging is enabled.
© 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