Skip to content

Commit

Permalink
Update Get-IncludedApps.ps1
Browse files Browse the repository at this point in the history
Updated Get-IncludedApps to work correctly with GPO source.
  • Loading branch information
nickjisc authored Mar 6, 2024
1 parent 608c0e9 commit 7bbc406
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Sources/WAU/Winget-AutoUpdate/functions/Get-IncludedApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ function Get-IncludedApps {

$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property

$AppIDs = @()

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

}
Expand Down

0 comments on commit 7bbc406

Please sign in to comment.