--- title: "Install-Package" ---
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.

Installs a universal package to the specified location using a Package Source.

Script usage:

ProGet::Install-Package(
	[PackageSource: <text>],
	Name: <text>,
	[Version: <text>],
	[To: <text>],
	[ClearTarget: <true/false>],
	[LocalRegistry: <integer>],
	[LocalCache: <true/false>],
	[DirectDownload: <true/false>],
	[Feed: <text>],
	[EndpointUrl: <text>],
	[UserName: <text>],
	[Password: <text>],
	[ApiKey: <text>],
	[FeedUrl: <text>]
);

Arguments:

NameFormatScript UsageUsage Notes
Package source
text
PackageSource
Package name
text
Name
This argument is required.
Package version
text
Version
Target directory
text
To
Clear target directory
true/false
ClearTarget
Use Local Registry
integer
LocalRegistry
LocalCache
true/false
LocalCache
Cache Package
Direct download
true/false
DirectDownload
Set this to value to false if your remote server doesn't have direct access to the ProGet feed.
Feed name
text
Feed
API endpoint URL
text
EndpointUrl
ProGet user name
text
UserName
The name of a user in ProGet that can access this feed.
ProGet password
text
Password
The password of a user in ProGet that can access this feed.
ProGet API Key
text
ApiKey
An API Key that can access this feed.
FeedUrl
text
FeedUrl

Example:

ProGet::Install-Package
(
    From: MyPackageSource,
    Name: MyAppPackage,
    Version: 3.4.2,
    To: C:\MyApps\MyApp
);