Update Get-IncludedApps.ps1

Updated Get-IncludedApps to work correctly with GPO source.
pull/580/head
Nick Brown 2024-03-06 15:40:10 +00:00 committed by GitHub
parent 608c0e95ca
commit 7bbc406706
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -10,12 +10,10 @@ function Get-IncludedApps {
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property $ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property
$AppIDs = @()
foreach ($ValueName in $ValueNames) { foreach ($ValueName in $ValueNames) {
$AppIDs = [Microsoft.Win32.Registry]::GetValue($Key, $ValueName, $false) $AppIDs += (Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList" -Name $ValueName)
[PSCustomObject]@{
Value = $ValueName
Data = $AppIDs.Trim()
}
} }
} }