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