Files
winutil/functions/private/Update-WinUtilProgramWinget.ps1
T

22 lines
602 B
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
Function Update-WinUtilProgramWinget {
<#
2023-10-19 17:12:55 -05:00
.SYNOPSIS
This will update all programs using Winget
+3
2023-03-07 12:28:00 -08:00
#>
[ScriptBlock]$wingetinstall = {
$host.ui.RawUI.WindowTitle = """Winget Install"""
2024-08-29 00:02:00 +02:00
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
+8
2024-03-28 12:39:23 -07:00
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
+3
2023-03-07 12:28:00 -08:00
}
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
}