mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-04-11 17:37:18 +10:00
* Update Install-WinUtilWinget.ps1 * Update Install-WinUtilWinget.ps1 * Update Install-WinUtilWinget.ps1 * Update Install-WinUtilWinget.ps1 * Update Install-WinUtilWinget.ps1
20 lines
479 B
PowerShell
20 lines
479 B
PowerShell
function Install-WinUtilWinget {
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Installs WinGet if not already installed.
|
|
|
|
.DESCRIPTION
|
|
installs winGet if needed
|
|
#>
|
|
if ((Test-WinUtilPackageManager -winget) -eq "installed") {
|
|
return
|
|
}
|
|
|
|
Write-Host "WinGet is not installed. Installing now..." -ForegroundColor Red
|
|
|
|
Install-PackageProvider -Name NuGet -Force
|
|
Install-Module -Name Microsoft.WinGet.Client -Force
|
|
Repair-WinGetPackageManager -AllUsers
|
|
}
|