Download File
Downloads a file from a web address to the computer. The file is only saved to the destination when the download and the optional checksum verification have both succeeded, so a half finished or wrong file is never left behind.
Parameters
Section titled “Parameters”Download Address
Section titled “Download Address”Required
The web address of the file to download. Only http and https addresses are supported, and network share paths are rejected.\n\nExample:\nhttps://cdn.example.com/setup.exe
Destination Path
Section titled “Destination Path”Required — Default: $Packageroot
The full path of the file to create on the computer. Any missing folders in the path are created automatically.\n\nExample:\nC:\Temp\Downloads\setup.exe\n\nIf you specify a folder instead, the file name is taken from the download address.\n\nThe field starts out as $PackageRoot, which is the folder the package itself is delivered to. Add the [Download Content] PowerBrick earlier in the workflow when you use $PackageRoot, or it has no value to resolve to. Keep in mind that the package folder belongs to this one installation - download to a permanent folder instead if the file has to survive the job, for example C:\ProgramData\Contoso.
Expected SHA256 Checksum
Section titled “Expected SHA256 Checksum”Optional
The SHA256 checksum the downloaded file must match, written as 64 hexadecimal characters. This is optional but strongly recommended, because it is the only way to be certain that the file you get is the file you expected.\n\nWhen the checksum does not match, the download fails and no file is written to the destination.\n\nLeave empty to skip the verification.
Timeout In Seconds
Section titled “Timeout In Seconds”Optional — Default: 300
How long a single download attempt is allowed to take before it is given up. Increase this for large files or slow connections. Leave empty to use 300 seconds.
Retries
Section titled “Retries”Optional — Default: 3
How many extra attempts are made when a download fails, with a growing pause between each attempt. Only temporary problems such as timeouts, server errors and throttling are retried. A missing file on the server or a wrong checksum is never retried. Use 0 to try only once.
Use Proxy Server
Section titled “Use Proxy Server”Required — Default: False
Enable to route the download through the proxy server specified below. Disable to connect directly using the settings of the computer.
Proxy Address
Section titled “Proxy Address”Optional
The address of the proxy server to use. This is only used when the proxy server option above is enabled, and the download fails if it is left empty in that case.\n\nExample:\nhttp://proxy.example.com:8080
Overwrite Existing File
Section titled “Overwrite Existing File”Required — Default: True
Enable to replace the file when it already exists at the destination. Disable to keep the existing file and skip the download entirely.
User Name
Section titled “User Name”Optional
The user name to authenticate with when the web server requires a sign in. Leave empty for public downloads.\n\nExample:\nCONTOSO\svc-download
Password
Section titled “Password”Optional
The password belonging to the user name above. It is never written to the log. Leave empty for public downloads.
Details
Section titled “Details”- Category: Download
- Brick ID:
File-Download
{ "category": "download", "description": "Downloads a file from a web address to the computer. The file is only saved to the destination when the download and the optional checksum verification have both succeeded, so a half finished or wrong file is never left behind.", "developerVendor": "CapaSystems A/S", "displayName": null, "id": "File-Download", "name": "Download File", "parameters": [ { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "The web address of the file to download. Only http and https addresses are supported, and network share paths are rejected.\\n\\nExample:\\nhttps://cdn.example.com/setup.exe", "id": "Url", "name": "Download Address", "regExValidation": "^(?i)\"?https?://[^\\s\"]+\"?$", "required": true, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "$Packageroot", "defaultValueObject": null, "description": "The full path of the file to create on the computer. Any missing folders in the path are created automatically.\\n\\nExample:\\nC:\\Temp\\Downloads\\setup.exe\\n\\nIf you specify a folder instead, the file name is taken from the download address.\\n\\nThe field starts out as $PackageRoot, which is the folder the package itself is delivered to. Add the [Download Content] PowerBrick earlier in the workflow when you use $PackageRoot, or it has no value to resolve to. Keep in mind that the package folder belongs to this one installation - download to a permanent folder instead if the file has to survive the job, for example C:\\ProgramData\\Contoso.", "id": "DestinationPath", "name": "Destination Path", "regExValidation": "", "required": true, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "The SHA256 checksum the downloaded file must match, written as 64 hexadecimal characters. This is optional but strongly recommended, because it is the only way to be certain that the file you get is the file you expected.\\n\\nWhen the checksum does not match, the download fails and no file is written to the destination.\\n\\nLeave empty to skip the verification.", "id": "ExpectedSha256", "name": "Expected SHA256 Checksum", "regExValidation": "^\\s*$|^\\s*\"?\\s*(?:[0-9a-fA-F][\\s:-]*){64}\"?\\s*$", "required": false, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "300", "defaultValueObject": null, "description": "How long a single download attempt is allowed to take before it is given up. Increase this for large files or slow connections. Leave empty to use 300 seconds.", "id": "TimeoutSeconds", "name": "Timeout In Seconds", "regExValidation": "", "required": false, "type": "Integer", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "3", "defaultValueObject": null, "description": "How many extra attempts are made when a download fails, with a growing pause between each attempt. Only temporary problems such as timeouts, server errors and throttling are retried. A missing file on the server or a wrong checksum is never retried. Use 0 to try only once.", "id": "Retries", "name": "Retries", "regExValidation": "", "required": false, "type": "Integer", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "False", "defaultValueObject": null, "description": "Enable to route the download through the proxy server specified below. Disable to connect directly using the settings of the computer.", "id": "UseProxy", "name": "Use Proxy Server", "regExValidation": "", "required": true, "type": "Boolean", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "The address of the proxy server to use. This is only used when the proxy server option above is enabled, and the download fails if it is left empty in that case.\\n\\nExample:\\nhttp://proxy.example.com:8080", "id": "ProxyUrl", "name": "Proxy Address", "regExValidation": "", "required": false, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "True", "defaultValueObject": null, "description": "Enable to replace the file when it already exists at the destination. Disable to keep the existing file and skip the download entirely.", "id": "OverwriteIfExists", "name": "Overwrite Existing File", "regExValidation": "", "required": true, "type": "Boolean", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "The user name to authenticate with when the web server requires a sign in. Leave empty for public downloads.\\n\\nExample:\\nCONTOSO\\svc-download", "id": "UserName", "name": "User Name", "regExValidation": "", "required": false, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "The password belonging to the user name above. It is never written to the log. Leave empty for public downloads.", "id": "Base64Password", "name": "Password", "regExValidation": "", "required": false, "type": "TextBoxWithPassword", "value": null, "values": [], "valuesObject": null } ], "powershell": { "base64Encoded": true, "function": "ZnVuY3Rpb2..." }, "type": "powerbrick", "version": "2026.10.8.1"}