Files
winutil/functions/private/Install-WinUtilChoco.ps1
T

16 lines
382 B
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
function Install-WinUtilChoco {
<#
2023-10-19 17:12:55 -05:00
.SYNOPSIS
Installs Chocolatey if it is not already installed
+3
2023-03-07 12:28:00 -08:00
#>
2026-01-08 22:37:37 +02:00
if ((Test-WinUtilPackageManager -choco) -eq "installed") {
return
+3
2023-03-07 12:28:00 -08:00
}
2026-01-08 09:01:34 -06:00
Write-Host "Chocolatey is not installed. Installing now..."
2026-01-08 22:37:37 +02:00
Invoke-WebRequest -Uri https://community.chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression
+3
2023-03-07 12:28:00 -08:00
}