wingetautoupdate/Winget-AutoUpdate/functions/Get-WAUConfig.ps1

16 lines
503 B
PowerShell
Raw Normal View History

2022-04-13 16:50:06 +00:00
#Function to get WAU Configs
2022-04-05 13:17:18 +00:00
function Get-WAUConfig{
[xml]$WAUConfig = Get-Content "$WorkingDir\config\config.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
#Check if WAU is configured for Black or White List
if ($true -eq [System.Convert]::ToBoolean($WAUConfig.app.UseWAUWhiteList)){
Write-Log "WAU uses White List config"
$Script:UseWhiteList = $true
}
else{
Write-Log "WAU uses Black List config"
$Script:UseWhiteList = $false
}
}