Last edit, Done!
parent
021170b72b
commit
76e3b4bc22
|
@ -4,10 +4,12 @@ function Get-ExcludedApps {
|
|||
|
||||
if ($GPOList) {
|
||||
|
||||
$Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\BlackList\'
|
||||
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\BlackList").Property
|
||||
if (Test-Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\BlackList") {
|
||||
|
||||
$Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\BlackList\'
|
||||
|
||||
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\BlackList").Property
|
||||
|
||||
if ($ValueNames) {
|
||||
foreach ($ValueName in $ValueNames) {
|
||||
$AppIDs = [Microsoft.Win32.Registry]::GetValue($Key, $ValueName, $false)
|
||||
[PSCustomObject]@{
|
||||
|
@ -15,10 +17,9 @@ function Get-ExcludedApps {
|
|||
Data = $AppIDs.Trim()
|
||||
}
|
||||
}
|
||||
|
||||
return $AppIDs
|
||||
|
||||
|
||||
}
|
||||
return $AppIDs
|
||||
|
||||
}
|
||||
elseif (Test-Path "$WorkingDir\excluded_apps.txt") {
|
||||
|
|
|
@ -4,10 +4,12 @@ function Get-IncludedApps {
|
|||
|
||||
if ($GPOList) {
|
||||
|
||||
$Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList\'
|
||||
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property
|
||||
if (Test-Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList") {
|
||||
|
||||
if ($ValueNames) {
|
||||
$Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList\'
|
||||
|
||||
$ValueNames = (Get-Item -Path "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate\WhiteList").Property
|
||||
|
||||
foreach ($ValueName in $ValueNames) {
|
||||
$AppIDs = [Microsoft.Win32.Registry]::GetValue($Key, $ValueName, $false)
|
||||
[PSCustomObject]@{
|
||||
|
@ -16,9 +18,9 @@ function Get-IncludedApps {
|
|||
}
|
||||
}
|
||||
|
||||
return $AppIDs
|
||||
}
|
||||
|
||||
return $AppIDs
|
||||
|
||||
}
|
||||
elseif (Test-Path "$WorkingDir\included_apps.txt") {
|
||||
|
||||
|
|
Loading…
Reference in New Issue