Allow custom winget arguments
This commit is contained in:
parent
ddfbe17a49
commit
458c46575c
1 changed files with 2 additions and 1 deletions
|
@ -56,6 +56,7 @@ $null = New-Module {
|
||||||
function Install-WingetPackage {
|
function Install-WingetPackage {
|
||||||
param(
|
param(
|
||||||
[switch] $Force,
|
[switch] $Force,
|
||||||
|
[string[]] $ArgumentList,
|
||||||
[Parameter(Position=0)]
|
[Parameter(Position=0)]
|
||||||
[string] $Name,
|
[string] $Name,
|
||||||
[Parameter(ValueFromRemainingArguments = $true)]
|
[Parameter(ValueFromRemainingArguments = $true)]
|
||||||
|
@ -72,7 +73,7 @@ $null = New-Module {
|
||||||
--accept-source-agreements --accept-package-agreements `
|
--accept-source-agreements --accept-package-agreements `
|
||||||
--source winget `
|
--source winget `
|
||||||
--scope machine `
|
--scope machine `
|
||||||
--exact --id $name;
|
--exact --id $name $ArgumentList;
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Package ``$name`` is already installed"
|
Write-Host "Package ``$name`` is already installed"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue