ps/Modules/Alkami.PowerShell.Choco/Public/Invoke-ChocoInstallPackages.ps1

32 lines
661 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
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;
}