Allow custom winget arguments

This commit is contained in:
Manuel Thalmann 2024-08-08 04:29:00 +02:00
parent ddfbe17a49
commit 458c46575c

View file

@ -56,6 +56,7 @@ $null = New-Module {
function Install-WingetPackage {
param(
[switch] $Force,
[string[]] $ArgumentList,
[Parameter(Position=0)]
[string] $Name,
[Parameter(ValueFromRemainingArguments = $true)]
@ -72,7 +73,7 @@ $null = New-Module {
--accept-source-agreements --accept-package-agreements `
--source winget `
--scope machine `
--exact --id $name;
--exact --id $name $ArgumentList;
} else {
Write-Host "Package ``$name`` is already installed"
}