mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2024-11-24 11:45:29 +00:00
Fixed whitelisted apps being removed
I fixed an issue where the whitelisted apps; Paint3D, Calculator, Store, and Photos were being removed. I changed the conditional operator from -notlike to -notcontains on lines 22-25, and lines 30-33. Then, I removed the asterisks from each AppXPackage/AppXProvisionedPackage name. The issue of the whitelisted apps being removed should no longer be the case.
This commit is contained in:
parent
3f628a709c
commit
542619fa87
@ -19,18 +19,18 @@ Function Start-Debloat {
|
||||
|
||||
#Removes AppxPackages
|
||||
Get-AppxPackage -AllUsers |
|
||||
Where-Object {$_.name -notlike "*Microsoft.Paint3D*"} |
|
||||
Where-Object {$_.name -notlike "*Microsoft.WindowsCalculator*"} |
|
||||
Where-Object {$_.name -notlike "*Microsoft.WindowsStore*"} |
|
||||
Where-Object {$_.name -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
|
||||
}
|
||||
Function Remove-Keys {
|
||||
|
Loading…
Reference in New Issue
Block a user