mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-15 07:05:51 -06:00
6a99be9e05
* improve log logics * spelling fix * change date format
22 lines
602 B
PowerShell
22 lines
602 B
PowerShell
Function Update-WinUtilProgramWinget {
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
This will update all programs using Winget
|
|
|
|
#>
|
|
|
|
[ScriptBlock]$wingetinstall = {
|
|
|
|
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
|
|
|
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
|
|
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
|
|
|
|
}
|
|
|
|
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
|
|
|
|
}
|