From d02dfa39ed3f2c8076e6ade91a3d0af078b0ec45 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Thu, 28 Dec 2017 20:33:12 -0800 Subject: [PATCH] Changed $_.name on lines 24, 25, 32 and 33. I changed the $_.name on lines 24, 25, 32, and 33 to $_.packagename since the whitelisted apps "Photos" and "Store" were still being removed. Now they shouldn't be removed. --- Windows10Debloater.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Windows10Debloater.ps1 b/Windows10Debloater.ps1 index 11c3018..4e4f2d7 100644 --- a/Windows10Debloater.ps1 +++ b/Windows10Debloater.ps1 @@ -21,16 +21,16 @@ Function Start-Debloat { 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 {$_.packagename -notlike "*Microsoft.WindowsStore*"} | + Where-Object {$_.packagename -notlike "*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 {$_.name -notlike "*Microsoft.WindowsStore*"} | - Where-Object {$_.name -notlike "*Microsoft.Windows.Photos*"} | + Where-Object {$_.packagename -notlike "*Microsoft.WindowsStore*"} | + Where-Object {$_.packagename -notlike "*Microsoft.Windows.Photos*"} | Remove-AppxProvisionedPackage -online -ErrorAction SilentlyContinue } Function Remove-Keys {