mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2024-11-24 11:45:29 +00:00
Fixed whitelisted apps being removed
I fixed the issue where the whitelisted apps were being removed. I then changed the conditional operator on lines 22-25, and lines 36-39, from -notlike to -notcontains. I also removed the asterisks from the AppXPackage/AppXProvisionedPackage names which results in the whitelisting working appropriately. The whitelisted apps are no longer being removed.
This commit is contained in:
parent
542619fa87
commit
acda2ee106
@ -25,18 +25,18 @@ Function Start-Debloat {
|
||||
|
||||
#Removes AppxPackages
|
||||
Get-AppxPackage -AllUsers |
|
||||
Where-Object {$_.name -notlike "*Microsoft.Paint3D"} |
|
||||
Where-Object {$_.name -notlike "*Microsoft.WindowsCalculator*"} |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.WindowsStore*"} |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.Windows.Photos*"} |
|
||||
Where-Object {$_.name -notcontains "Microsoft.Paint3D"} |
|
||||
Where-Object {$_.name -notcontains "Microsoft.WindowsCalculator"} |
|
||||
Where-Object {$_.name -notcontains "Microsoft.WindowsStore"} |
|
||||
Where-Object {$_.name -notcontains "Microsoft.Windows.Photos"} |
|
||||
Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||
|
||||
|
||||
#Removes AppxProvisionedPackages
|
||||
Get-AppxProvisionedPackage -online |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.Paint3D*"} |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.WindowsCalculator*"} |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.WindowsStore*"} |
|
||||
Where-Object {$_.packagename -notlike "*Microsoft.Windows.Photos*"} |
|
||||
Where-Object {$_.packagename -notcontains "Microsoft.Paint3D"} |
|
||||
Where-Object {$_.packagename -notcontains "Microsoft.WindowsCalculator"} |
|
||||
Where-Object {$_.packagename -notcontains "Microsoft.WindowsStore"} |
|
||||
Where-Object {$_.packagename -notcontains "Microsoft.Windows.Photos"} |
|
||||
Remove-AppxProvisionedPackage -online -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user