Export-BCPDatabase
Creates a new Vault BCP package from the currently connected powerLoad Database.
Syntax
Export-BcpDatabase -Path <DirectoryInfo> [-NoSourceFiles] [-NoFSPath] [<CommonParameters>]
Parameters
Type |
Name |
Description |
Default value |
Optional |
|---|---|---|---|---|
Path |
Destination directory where the Vault BCP XML files will be written. |
no |
||
SwitchParameter |
NoSourceFiles |
Exports a BCP package without links to the actual files. Instead, 0kb files are imported into Vault. |
False |
yes |
SwitchParameter |
NoFSPath |
Creates file-Iteration nodes using LocalPath= instead of FSPath= attributes. Required when the target ADMS version does not support the /FS attribute. |
False |
yes |
Return type
empty ← On failure the Exception/ErrorMessage can be accessed using $Error.
Remarks
The cmdlet exports all SQL records from the connected powerLoad DB (created by Import-BcpDatabase or connected via Connect-BcpDatabase) into a new Vault BCP package in the specified destination Path.
It creates—or overwrites—XML files such as:
Vault.xml
ItemsWrapper.xml
BOMWrapper.xml
CustomObjectsWrapper.xml
Unformatted XML Output
Currently, these XML files are generated quickly but without human-readable formatting.
For analysis purposes—especially with smaller output packages—you can manually format them using editors such as VS Code or Notepad++.
Behaviors are not exported. To import the resulting BCP package into a target Vault, all referenced UDPs, lifecycle definitions, and categories must already exist in the target system!
For testing, it can be useful to use the -NoSourceFiles parameter. This creates a package that can be imported into Vault without requiring the actual files.
The resulting BCP package can be imported automatically into the latest Vault 2026 version, as well as into the latest updates of Vault 2024 and Vault 2025.
Older DTU versions (2024.0–2024.2 and 2025.0) do not support the /FS parameter used for the FSPath= attribute.
In this case, use -NoFSPath, which creates file <Iteration nodes using the older LocalPath= attribute instead. Be aware that this slows down the BCP import into the target Vault.
Note
For records in the Files table that do not have a LocalSourcePath and instead rely on a _TargetChecksum, an <IterationRef node is created.
Examples
Export a previously loaded and modified Vault BCP package
$db = Import-BcpDatabase -Package '.\MySourceVault_2025-12-05'
Invoke-SqlCmd -Query "UPDATE Files SET CreateUser = 'Administrator'" -ConnectionString $db.ConnectionString
Export-BcpDatabase -Path '.\MySourceVault_2025-12-05_transformed'
Validate that the Vault BCP package was exported successfully
Export-BCPDatabase -Path "..\BCP packages\coolOrange_$(get-date -Format 'yyyy-MM-dd')"
if($? -eq $false) {
$Error[0].Exception "Returns: The process cannot access the file 'Vault.xml' because it is being used by another process."
}