2024-06-04 20:27:27 -07:00
|
|
|
function Install-WinUtilProgramChoco {
|
2026-05-12 11:06:13 -07:00
|
|
|
param (
|
|
|
|
|
[Parameter(Mandatory=$true)]
|
|
|
|
|
[ValidateSet("Install", "Uninstall")]
|
|
|
|
|
[string]$Action,
|
2024-06-29 01:15:39 +03:00
|
|
|
|
2026-05-12 11:06:13 -07:00
|
|
|
[Parameter(Mandatory=$true)]
|
|
|
|
|
[string[]]$Programs
|
2024-06-04 20:27:27 -07:00
|
|
|
)
|
2024-06-29 01:15:39 +03:00
|
|
|
|
2026-05-12 11:06:13 -07:00
|
|
|
if ($Action -eq 'Install') {
|
|
|
|
|
Start-Process -FilePath choco -ArgumentList "install $Programs -y" -NoNewWindow -Wait
|
|
|
|
|
} else {
|
|
|
|
|
Start-Process -FilePath choco -ArgumentList "uninstall $Programs -y" -NoNewWindow -Wait
|
2024-09-10 20:02:22 +02:00
|
|
|
}
|
2024-06-04 20:27:27 -07:00
|
|
|
}
|