winutil/functions/private/Update-WinUtilProgramWinget...

22 lines
525 B
PowerShell

Function Update-WinUtilProgramWinget {
<#
.SYNOPSIS
This will update all programs using Winget
#>
[ScriptBlock]$wingetinstall = {
$host.ui.RawUI.WindowTitle = """Winget Install"""
Start-Transcript $ENV:TEMP\winget-update.log -Append
winget upgrade --all
Pause
}
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
}