I added a new blacklist function called DebloatBlacklist which will only remove the specified bloatware in the array in the function.
I also renamed the Start-Debloat function to DebloatAllApps since it seemed to remove absolutely everything related to the Microsoft Store (Any games, apps, etc).
When you hit "Yes" in the first prompt, you will be asked if you want debloat via a blacklist or if you want to remove everything, in terms of apps.
Write-Output"Restarting Explorer that was shut down before."
Startexplorer.exe-NoNewWindow
Start-Process explorer.exe-NoNewWindow
}
#GUI prompt Debloat/Revert options and GUI variables
@ -493,77 +566,116 @@ $Ask = 'The following will allow you to either Debloat Windows 10 or to revert c
Select "No"toRevertchangesmadebythisscript
Select "Cancel"tostopthescript.'
$EverythingorSpecific="Would you like to remove everything that was preinstalled on your Windows Machine? Select Yes to remove everything, or select No to remove apps via a blacklist."
$EdgePdf="Do you want to stop edge from taking over as the default PDF viewer?"
$EdgePdf2="Do you want to revert changes that disabled Edge as the default PDF viewer?"
$Reboot="For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete="Do you want to uninstall One Drive?"
$Prompt1=[Windows.MessageBox]::Show($Ask,"Debloat or Revert",$Button,$ErrorIco)
$Prompt1=[Windows.MessageBox]::Show($Ask,"Debloat or Revert",$Button,$ErrorIco)
Switch($Prompt1){
#This will debloat Windows 10
Yes{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Output"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Output"Uninstalling bloatware, please wait. The first step is to identify and remove them via a blacklist, and then to use the whitelist approach."
Write-Output"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Output"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Output"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Output"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Output"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Output"Disabling WAP push service"
Start-Sleep1
DisableWAPPush
Write-Output"WAP push service stopped and disabled"
$Prompt2=[Windows.MessageBox]::Show($EverythingorSpecific,"Everything or Specific",$Button,$Warn)
switch($Prompt2){
Yes{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Output"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Output"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Output"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Output"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Output"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Output"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Output"Disabling WAP push service"
Start-Sleep1
DisableWAPPush
Write-Output"WAP push service stopped and disabled"
Start-Sleep1;=$Debloat
}
No{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Output"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Output"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Output"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Output"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Output"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Output"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Output"Disabling WAP push service"
Start-Sleep1
DisableWAPPush
Write-Output"WAP push service stopped and disabled"