2023-10-03 08:18:00 +00:00
|
|
|
#Function to get the allow List apps
|
|
|
|
|
|
|
|
function Get-IncludedApps {
|
|
|
|
|
|
|
|
if ($GPOList) {
|
|
|
|
|
|
|
|
if (Test-Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList") {
|
|
|
|
|
|
|
|
$Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList\'
|
|
|
|
|
|
|
|
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property
|
|
|
|
|
2024-03-06 15:40:10 +00:00
|
|
|
$AppIDs = @()
|
|
|
|
|
2023-10-03 08:18:00 +00:00
|
|
|
foreach ($ValueName in $ValueNames) {
|
2024-03-08 12:01:29 +00:00
|
|
|
$AppIDs += (Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList" -Name $ValueName).Trim()
|
2023-01-20 02:59:27 +00:00
|
|
|
}
|
2023-10-03 08:18:00 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
return $AppIDs
|
|
|
|
|
|
|
|
}
|
|
|
|
elseif (Test-Path "$WorkingDir\included_apps.txt") {
|
|
|
|
|
|
|
|
return (Get-Content -Path "$WorkingDir\included_apps.txt").Trim() | Where-Object { $_.length -gt 0 }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-09-25 14:54:58 +00:00
|
|
|
}
|