Additional Hidden CBS Packages

This commit is contained in:
zoicware
2025-06-29 14:57:12 -04:00
committed by GitHub
parent 19218b13da
commit a77a1f1d94

View File

@@ -382,7 +382,7 @@ $regPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Serv
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
Get-ChildItem $regPath | ForEach-Object { Get-ChildItem $regPath | ForEach-Object {
$value = Get-ItemPropertyValue "registry::$($_.Name)" -Name Visibility $value = Get-ItemPropertyValue "registry::$($_.Name)" -Name Visibility
if ($value -eq 2 -and $_.PSChildName -like '*AIX*' -or $_.PSChildName -like '*Recall*') { if ($value -eq 2 -and $_.PSChildName -like '*AIX*' -or $_.PSChildName -like '*Recall*' -or $_.PSChildName -like '*Copilot*' -or $_.PSChildName -like '*CoreAI*') {
Set-ItemProperty "registry::$($_.Name)" -Name Visibility -Value 1 -Force Set-ItemProperty "registry::$($_.Name)" -Name Visibility -Value 1 -Force
Remove-Item "registry::$($_.Name)\Owners" -Force -ErrorAction SilentlyContinue Remove-Item "registry::$($_.Name)\Owners" -Force -ErrorAction SilentlyContinue
Remove-Item "registry::$($_.Name)\Updates" -Force -ErrorAction SilentlyContinue Remove-Item "registry::$($_.Name)\Updates" -Force -ErrorAction SilentlyContinue