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

20 lines
479 B
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
function Install-WinUtilWinget {
<#
2023-10-19 17:12:55 -05:00
.SYNOPSIS
Installs WinGet if not already installed.
2023-10-19 17:12:55 -05:00
+12
2023-11-28 16:11:11 -06:00
.DESCRIPTION
installs winGet if needed
+3
2023-03-07 12:28:00 -08:00
#>
if ((Test-WinUtilPackageManager -winget) -eq "installed") {
return
+3
2023-03-07 12:28:00 -08:00
}
Write-Host "WinGet is not installed. Installing now..." -ForegroundColor Red
2026-01-05 10:18:24 -06:00
Install-PackageProvider -Name NuGet -Force
2026-04-07 20:50:05 +03:00
Install-Module -Name Microsoft.WinGet.Client -Force
Repair-WinGetPackageManager -AllUsers
+8
2024-03-28 12:39:23 -07:00
}