wingetautoupdate/Winget-AutoUpdate/functions/Write-Log.ps1

10 lines
249 B
PowerShell
Raw Normal View History

2022-03-14 13:55:02 +00:00
function Write-Log ($LogMsg,$LogColor = "White") {
#Get log
$Log = "$(Get-Date -UFormat "%T") - $LogMsg"
#Echo log
$Log | Write-host -ForegroundColor $LogColor
#Write log to file
$Log | Out-File -filepath $LogFile -Append
}