Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Download-Asset

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
Not specifying will "Use URL from secure resource".
API key
text
ApiKey
Not specifying will "Use token from secure credentials".
User name
text
UserName
Not specifying will "Use user name from secure credentials".
Password
text
Password
Not specifying will "Use password from secure credentials".

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