---
title: "Download-Asset"
---
Downloads a file from a ProGet Asset Directory.
ProGet::Download-Asset(
From: <text>,
[To: <text>],
[ProxyData: <true/false>],
[Source: <text>],
[Resource: <text>],
[EndpointUrl: <text>],
[ApiKey: <text>],
[UserName: <text>],
[Password: <text>]
);
| Name | Format | Script Usage | Usage Notes |
|---|---|---|---|
| ☆ From (default) | text | From | This argument is required. |
| To | text | To | |
| Proxy data through BuildMaster/Otter | true/false | ProxyData | When true, requests will be made from the BuildMaster/Otter server instead of directly from the server in context. |
| Source | text | Source | |
| Secure resource (legacy) | text | Resource | |
| API endpoint URL | text | EndpointUrl | |
| API key | text | ApiKey | |
| User name | text | UserName | |
| Password | text | Password |
# download dir/info.txt to the current working directory from the MyAssetDirResource asset directory
ProGet::Download-Asset
(
From: dir/info.txt,
To: $WorkingDirectory,
Resource: MyAssetDirResource
);