---
title: "Deploy Artifact"
---
Retrieves the specified artifact from the artifact library and deploys it to a directory.
Deploy-Artifact(
[Name: <text>],
[To: <text>],
[Application: <text>],
[Release: <text>],
[Build: <text>],
[DeployAsZipFile: <text>],
[TransferAll: <true/false>],
[DoNotClearTarget: <true/false>],
[Verbose: <true/false>],
[OverwriteReadOnly: <true/false>],
[OptimizedFileTransfer: <true/false>]
);
This operation may be prefixed with Core::
, although this is a built-in namespace and isn't really necessary.
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
Artifact name (default) | text | Name | Default value is "Default". |
To directory | text | To | Value note: "$WorkingDirectory". |
Application name | text | Application | Value note: "$ApplicationName". |
Release number | text | Release | Value note: "$ReleaseNumber". |
Build number | text | Build | Valid values are specific build numbers, or "furthest" or "latest". Value note: "$BuildNumber". |
Deploy as zip file | text | DeployAsZipFile | When set to "true", the This field is only used when deploying as a zip file. |
Transfer all files | true/false | TransferAll | By default, files will only be transferred if the last modified date or file size has changed. If set to true, all files will be transferred regardless if they have been modified. This value should generally be set to false, except when it would take more time to compare the files than simply transferring and overwriting them all (i.e. the artifact contains thousands of small files). |
Do not clear target | true/false | DoNotClearTarget | |
Verbose logging | true/false | Verbose | |
Overwrite read-only files | true/false | OverwriteReadOnly | |
Use optimized file transfer | true/false | OptimizedFileTransfer | Transfers artifact files using a new implementation that increases performance. This feature is still experimental, so verify results before using in production. This option is ignored if TransferAllFiles is true. |
Note: Specifying "latest" as the source package number will attempt to retrieve the artifact from the most recently created build, whereas "furthest" will use the one that has been deployed to the furthest environment in the pipeline.