--- title: "Download-Asset" ---
This is generated from the built in components of Otter 2024.0, and may be different than what you have installed (especially if you have extensions); go to [Gear Icon] -> Administration -> Operations within your Otter instance to see exactly what operations are available.

Downloads a file from a ProGet Asset Directory.

Script usage:

ProGet::Download-Asset(
	From: <text>,
	[To: <text>],
	[ProxyData: <true/false>],
	[Source: <text>],
	[Resource: <text>],
	[EndpointUrl: <text>],
	[ApiKey: <text>],
	[UserName: <text>],
	[Password: <text>]
);

Arguments:

NameFormatScript UsageUsage 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

Example:


# 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
);