Adds a new file to Vault.

Add-VaultFile -From <String> -To <String> [-Force <Bool>] [-Hidden <Bool>] [-Comment <String>] [-FileClassification <String>] [<CommonParameters>]

Type Name Description Default value Optional
String From Absolute Path to a local file no
String To Absolute Vault path. It has to include the filename no
Boolean Force If the target directory doesn't exist it will be createdTrueyes
Boolean Hidden If true the file will be hidden in vaultFalseyes
String Comment A comment for the checkinGenerated by coolOrange powerJobsyes
String FileClassification The classification of the file. See the table belowFalseyes
Name Description
ConfigurationFactory A template file (ex. iPart factories).
ConfigurationMember A file created from a template (ex. iPart members).
DesignDocument A design file containing data derived from a CAD file (ex. IDW or IPN)
DesignSubstitute A design which is a substitute for a more complex design file.
DesignVisualization A visualization file (ex. DWF). Although the Vault server will accept any file type as a visualization, many Vault clients will only work properly with DWF files.
ElectricalProject A electrical CAD project file (ex. wdp).
NoneThe default file classification. This should be used for standard CAD files (ex. DWG, IPT, and IAM) and other types.

File ← on success
empty ← on failure

The cmdlet uploads a local document to the Vault Server, and takes care about adding a new file or performing checkout- and checkin-operations.

There are three different situation on how the cmdlet behaves:

  • When the target Vault-file does not exist, then it will be created with the local document
  • When the target Vault-file exist and is not checked out, then the Vault-file will be checked-out and rechecked-in with the local document
  • When the target Vault-file exist and is checked out, then the local document will be checked-in to Vault

When the target Vault-file already exist the cmdlet takes care about creating the new Vault-file version with the exact same File associations as the previous file version in Vault.
In other words, the File dependencies and attachments do not become manipulated at all!

When calling Add-VaultFile with exact same parameters and the same file binary content as the latest file version, the Vault Server will not create a new version of the file, because it detects that nothing has changed!
However when changing only the -Comment, the server will also not create a new version.

Add File

 $file = Add-VaultFile -From "C:\Temp\pV_1.ipt" -To "$/PowerVaultTestFiles/pV_7.test" 

Add File with comment and classification

 $file = Add-VaultFile -From "C:\Temp\pV_1.dwf" -To "$/PowerVaultTestFiles/pV_7.test" -Comment "Test" -FileClassification "DesignVisualization"