diff --git a/functions/private/Install-WinUtilWinget.ps1 b/functions/private/Install-WinUtilWinget.ps1 index 8e276b2b..f3fc4627 100644 --- a/functions/private/Install-WinUtilWinget.ps1 +++ b/functions/private/Install-WinUtilWinget.ps1 @@ -12,10 +12,8 @@ function Install-WinUtilWinget { } Write-Host "WinGet is not installed. Installing now..." -ForegroundColor Red - Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-PackageProvider -Name NuGet -Force - Install-Module Microsoft.WinGet.Client -Force - Import-Module Microsoft.WinGet.Client - Repair-WinGetPackageManager + Install-Module -Name Microsoft.WinGet.Client -Force + Repair-WinGetPackageManager -AllUsers }