32 lines
661 B
PowerShell
32 lines
661 B
PowerShell
function Invoke-ChocoInstallPackages {
|
|
<#
|
|
.SYNOPSIS
|
|
Installs a list of Chocolatey packages.
|
|
#>
|
|
[CmdletBinding()]
|
|
Param(
|
|
[Parameter(Mandatory = $true)]
|
|
[Alias("Packages")]
|
|
[string]$packagesText,
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
[Alias("f")]
|
|
[switch]$force,
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
[Alias("e")]
|
|
[string]$environment
|
|
)
|
|
|
|
$packageObjects = Get-ChocoStateReleaseInput($packagesText);
|
|
|
|
$params = @{
|
|
"packages" = $packageObjects;
|
|
"force" = $force.IsPresent;
|
|
"e" = $environment;
|
|
};
|
|
|
|
Invoke-ChocoInstallPackagesPrivate @params;
|
|
}
|
|
|