@ -1,9 +1,17 @@
<#
$EnableEdgePDFTakeover . Text = " Enable Edge PDF Takeover "
$EnableEdgePDFTakeover . Width = 185
$EnableEdgePDFTakeover . Height = 35
$EnableEdgePDFTakeover . Location = New-Object System . Drawing . Point ( 155 , 260 )
#>
#This will self elevate the script so with a UAC prompt since this script needs to be run as an Administrator in order to function properly.
$ErrorActionPreference = 'SilentlyContinue'
$Button = [ Windows.MessageBoxButton ] :: YesNoCancel
$ErrorIco = [ Windows.MessageBoxImage ] :: Error
$Button = [ System. Windows.MessageBoxButton] :: YesNoCancel
$ErrorIco = [ System. Windows.MessageBoxImage] :: Error
$Ask = ' Do you want to run this as an Administrator ?
Select " Yes " to Run as an Administrator
@ -13,12 +21,12 @@ $Ask = 'Do you want to run this as an Administrator?
Select " Cancel " to stop the script . '
If ( ! ( [ Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity ] :: GetCurrent ( ) ) . IsInRole ( [ Security.Principal.WindowsBuiltInRole ] 'Administrator' ) ) {
$Prompt = [ Windows.MessageBox] :: Show ( $Ask , " Run as an Administrator or not? " , $Button , $ErrorIco )
$Prompt = [ System. Windows.MessageBox] :: Show ( $Ask , " Run as an Administrator or not? " , $Button , $ErrorIco )
Switch ( $Prompt ) {
#This will debloat Windows 10
Yes {
Write-Host " You didn't run this script as an Administrator. This script will self elevate to run as an Administrator and continue. "
Start-Process powers hell. exe -ArgumentList ( " -NoProfile -ExecutionPolicy Bypass -File `" {0} `" " -f $PSCommandPath ) -Verb RunAs
Start-Process PowerS hell. exe -ArgumentList ( " -NoProfile -ExecutionPolicy Bypass -File `" {0} `" " -f $PSCommandPath ) -Verb RunAs
Exit
}
No {
@ -117,10 +125,10 @@ $global:WhiteListedApps = @(
)
#NonRemovable Apps that where getting attempted and the system would reject the uninstall, speeds up debloat and prevents 'initalizing' overlay when removing apps
$NonRemovables = Get-AppxPackage -AllUsers | Where-Object { $_ . NonRemovable -eq $true } | fore ach { $_ . Name }
$NonRemovables + = Get-AppxPackage | Where-Object { $_ . NonRemovable -eq $true } | fore ach { $_ . Name }
$NonRemovables + = Get-AppxProvisionedPackage -Online | Where-Object { $_ . NonRemovable -eq $true } | fore ach { $_ . DisplayName }
$NonRemovables = $NonRemovables | Sort-Object - u nique
$NonRemovables = Get-AppxPackage -AllUsers | Where-Object { $_ . NonRemovable -eq $true } | ForE ach { $_ . Name }
$NonRemovables + = Get-AppxPackage | Where-Object { $_ . NonRemovable -eq $true } | ForE ach { $_ . Name }
$NonRemovables + = Get-AppxProvisionedPackage -Online | Where-Object { $_ . NonRemovable -eq $true } | ForE ach { $_ . DisplayName }
$NonRemovables = $NonRemovables | Sort-Object - U nique
if ( $NonRemovables -eq $null ) {
# the .NonRemovable property doesn't exist until version 18xx. Use a hard-coded list instead.
@ -199,146 +207,146 @@ Add-Type -AssemblyName System.Windows.Forms
[ System.Windows.Forms.Application ] :: EnableVisualStyles ( )
#region begin GUI
$Form = New-Object s ystem. Windows . Forms . Form
$Form = New-Object S ystem. Windows . Forms . Form
$Form . ClientSize = '800,500'
$Form . t ext = " Windows10Debloater "
$Form . T ext = " Windows10Debloater "
$Form . TopMost = $false
$Debloat = New-Object s ystem. Windows . Forms . Label
$Debloat . t ext = " Debloat Options "
$Debloat = New-Object S ystem. Windows . Forms . Label
$Debloat . T ext = " Debloat Options "
$Debloat . AutoSize = $true
$Debloat . w idth = 25
$Debloat . h eight = 10
$Debloat . l ocation = New-Object System . Drawing . Point ( 9 , 8 )
$Debloat . W idth = 25
$Debloat . H eight = 10
$Debloat . L ocation = New-Object System . Drawing . Point ( 9 , 8 )
$Debloat . Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
$CustomizeBlacklists = New-Object s ystem. Windows . Forms . Button
$CustomizeBlacklists . t ext = " Customize Blacklist "
$CustomizeBlacklists . w idth = 140
$CustomizeBlacklists . h eight = 40
$CustomizeBlacklists . l ocation = New-Object System . Drawing . Point ( 9 , 32 )
$CustomizeBlacklists = New-Object S ystem. Windows . Forms . Button
$CustomizeBlacklists . T ext = " Customize Blacklist "
$CustomizeBlacklists . W idth = 140
$CustomizeBlacklists . H eight = 40
$CustomizeBlacklists . L ocation = New-Object System . Drawing . Point ( 9 , 32 )
$CustomizeBlacklists . Font = 'Microsoft Sans Serif,10'
$RemoveAllBloatware = New-Object s ystem. Windows . Forms . Button
$RemoveAllBloatware . t ext = " Remove All Bloatware "
$RemoveAllBloatware . w idth = 142
$RemoveAllBloatware . h eight = 40
$RemoveAllBloatware . l ocation = New-Object System . Drawing . Point ( 8 , 79 )
$RemoveAllBloatware = New-Object S ystem. Windows . Forms . Button
$RemoveAllBloatware . T ext = " Remove All Bloatware "
$RemoveAllBloatware . W idth = 142
$RemoveAllBloatware . H eight = 40
$RemoveAllBloatware . L ocation = New-Object System . Drawing . Point ( 8 , 79 )
$RemoveAllBloatware . Font = 'Microsoft Sans Serif,10'
$RemoveBlacklist = New-Object s ystem. Windows . Forms . Button
$RemoveBlacklist . t ext = " Remove Bloatware With Customized Blacklist "
$RemoveBlacklist . w idth = 205
$RemoveBlacklist . h eight = 37
$RemoveBlacklist . l ocation = New-Object System . Drawing . Point ( 9 , 124 )
$RemoveBlacklist = New-Object S ystem. Windows . Forms . Button
$RemoveBlacklist . T ext = " Remove Bloatware With Customized Blacklist "
$RemoveBlacklist . W idth = 205
$RemoveBlacklist . H eight = 37
$RemoveBlacklist . L ocation = New-Object System . Drawing . Point ( 9 , 124 )
$RemoveBlacklist . Font = 'Microsoft Sans Serif,10'
$Label1 = New-Object s ystem. Windows . Forms . Label
$Label1 . t ext = " Revert Registry Changes "
$Label1 = New-Object S ystem. Windows . Forms . Label
$Label1 . T ext = " Revert Registry Changes "
$Label1 . AutoSize = $true
$Label1 . w idth = 25
$Label1 . h eight = 10
$Label1 . l ocation = New-Object System . Drawing . Point ( 254 , 7 )
$Label1 . W idth = 25
$Label1 . H eight = 10
$Label1 . L ocation = New-Object System . Drawing . Point ( 254 , 7 )
$Label1 . Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
$RevertChange = New-Object s ystem. Windows . Forms . Button
$RevertChange . t ext = " Revert Registry Changes "
$RevertChange . w idth = 113
$RevertChange . h eight = 36
$RevertChange . l ocation = New-Object System . Drawing . Point ( 254 , 32 )
$RevertChange = New-Object S ystem. Windows . Forms . Button
$RevertChange . T ext = " Revert Registry Changes "
$RevertChange . W idth = 113
$RevertChange . H eight = 36
$RevertChange . L ocation = New-Object System . Drawing . Point ( 254 , 32 )
$RevertChange . Font = 'Microsoft Sans Serif,10'
$Label2 = New-Object s ystem. Windows . Forms . Label
$Label2 . t ext = " Optional Changes/Fixes "
$Label2 = New-Object S ystem. Windows . Forms . Label
$Label2 . T ext = " Optional Changes/Fixes "
$Label2 . AutoSize = $true
$Label2 . w idth = 25
$Label2 . h eight = 10
$Label2 . l ocation = New-Object System . Drawing . Point ( 9 , 193 )
$Label2 . W idth = 25
$Label2 . H eight = 10
$Label2 . L ocation = New-Object System . Drawing . Point ( 9 , 193 )
$Label2 . Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
$DisableCortana = New-Object s ystem. Windows . Forms . Button
$DisableCortana . t ext = " Disable Cortana "
$DisableCortana . w idth = 111
$DisableCortana . h eight = 36
$DisableCortana . l ocation = New-Object System . Drawing . Point ( 9 , 217 )
$DisableCortana = New-Object S ystem. Windows . Forms . Button
$DisableCortana . T ext = " Disable Cortana "
$DisableCortana . W idth = 111
$DisableCortana . H eight = 36
$DisableCortana . L ocation = New-Object System . Drawing . Point ( 9 , 217 )
$DisableCortana . Font = 'Microsoft Sans Serif,10'
$EnableCortana = New-Object s ystem. Windows . Forms . Button
$EnableCortana . t ext = " Enable Cortana "
$EnableCortana . w idth = 112
$EnableCortana . h eight = 36
$EnableCortana . l ocation = New-Object System . Drawing . Point ( 9 , 260 )
$EnableCortana = New-Object S ystem. Windows . Forms . Button
$EnableCortana . T ext = " Enable Cortana "
$EnableCortana . W idth = 112
$EnableCortana . H eight = 36
$EnableCortana . L ocation = New-Object System . Drawing . Point ( 9 , 260 )
$EnableCortana . Font = 'Microsoft Sans Serif,10'
$StopEdgePDFTakeover = New-Object s ystem. Windows . Forms . Button
$StopEdgePDFTakeover . t ext = " Stop Edge PDF Takeover "
$StopEdgePDFTakeover . w idth = 175
$StopEdgePDFTakeover . h eight = 35
$StopEdgePDFTakeover . l ocation = New-Object System . Drawing . Point ( 155 , 217 )
$StopEdgePDFTakeover = New-Object S ystem. Windows . Forms . Button
$StopEdgePDFTakeover . T ext = " Stop Edge PDF Takeover "
$StopEdgePDFTakeover . W idth = 175
$StopEdgePDFTakeover . H eight = 35
$StopEdgePDFTakeover . L ocation = New-Object System . Drawing . Point ( 155 , 217 )
$StopEdgePDFTakeover . Font = 'Microsoft Sans Serif,10'
$EnableEdgePDFTakeover = New-Object s ystem. Windows . Forms . Button
$EnableEdgePDFTakeover . t ext = " Enable Edge PDF Takeover "
$EnableEdgePDFTakeover . w idth = 185
$EnableEdgePDFTakeover . h eight = 35
$EnableEdgePDFTakeover . l ocation = New-Object System . Drawing . Point ( 155 , 260 )
$EnableEdgePDFTakeover = New-Object S ystem. Windows . Forms . Button
$EnableEdgePDFTakeover . T ext = " Enable Edge PDF Takeover "
$EnableEdgePDFTakeover . W idth = 185
$EnableEdgePDFTakeover . H eight = 35
$EnableEdgePDFTakeover . L ocation = New-Object System . Drawing . Point ( 155 , 260 )
$EnableEdgePDFTakeover . Font = 'Microsoft Sans Serif,10'
$DisableTelemetry = New-Object s ystem. Windows . Forms . Button
$DisableTelemetry . t ext = " Disable Telemetry/Tasks "
$DisableTelemetry . w idth = 152
$DisableTelemetry . h eight = 35
$DisableTelemetry . l ocation = New-Object System . Drawing . Point ( 365 , 260 )
$DisableTelemetry = New-Object S ystem. Windows . Forms . Button
$DisableTelemetry . T ext = " Disable Telemetry/Tasks "
$DisableTelemetry . W idth = 152
$DisableTelemetry . H eight = 35
$DisableTelemetry . L ocation = New-Object System . Drawing . Point ( 365 , 260 )
$DisableTelemetry . Font = 'Microsoft Sans Serif,10'
$RemoveRegkeys = New-Object s ystem. Windows . Forms . Button
$RemoveRegkeys . t ext = " Remove Bloatware Regkeys "
$RemoveRegkeys . w idth = 188
$RemoveRegkeys . h eight = 35
$RemoveRegkeys . l ocation = New-Object System . Drawing . Point ( 540 , 260 )
$RemoveRegkeys = New-Object S ystem. Windows . Forms . Button
$RemoveRegkeys . T ext = " Remove Bloatware Regkeys "
$RemoveRegkeys . W idth = 188
$RemoveRegkeys . H eight = 35
$RemoveRegkeys . L ocation = New-Object System . Drawing . Point ( 540 , 260 )
$RemoveRegkeys . Font = 'Microsoft Sans Serif,10'
$UnpinStartMenuTiles = New-Object s ystem. Windows . Forms . Button
$UnpinStartMenuTiles . t ext = " Unpin Tiles From Start Menu "
$UnpinStartMenuTiles . w idth = 190
$UnpinStartMenuTiles . h eight = 35
$UnpinStartMenuTiles . l ocation = New-Object System . Drawing . Point ( 540 , 217 )
$UnpinStartMenuTiles = New-Object S ystem. Windows . Forms . Button
$UnpinStartMenuTiles . T ext = " Unpin Tiles From Start Menu "
$UnpinStartMenuTiles . W idth = 190
$UnpinStartMenuTiles . H eight = 35
$UnpinStartMenuTiles . L ocation = New-Object System . Drawing . Point ( 540 , 217 )
$UnpinStartMenuTiles . Font = 'Microsoft Sans Serif,10'
$RemoveOnedrive = New-Object s ystem. Windows . Forms . Button
$RemoveOnedrive . t ext = " Uninstall OneDrive "
$RemoveOnedrive . w idth = 152
$RemoveOnedrive . h eight = 35
$RemoveOnedrive . l ocation = New-Object System . Drawing . Point ( 365 , 217 )
$RemoveOnedrive = New-Object S ystem. Windows . Forms . Button
$RemoveOnedrive . T ext = " Uninstall OneDrive "
$RemoveOnedrive . W idth = 152
$RemoveOnedrive . H eight = 35
$RemoveOnedrive . L ocation = New-Object System . Drawing . Point ( 365 , 217 )
$RemoveOnedrive . Font = 'Microsoft Sans Serif,10'
#$FixWhitelist = New-Object s ystem.Windows.Forms.Button
#$FixWhitelist. t ext = "Fix Whitelisted Apps"
#$FixWhitelist. w idth = 130
#$FixWhitelist. h eight = 37
#$FixWhitelist. l ocation = New-Object System.Drawing.Point(254, 74)
#$FixWhitelist = New-Object S ystem.Windows.Forms.Button
#$FixWhitelist. T ext = "Fix Whitelisted Apps"
#$FixWhitelist. W idth = 130
#$FixWhitelist. H eight = 37
#$FixWhitelist. L ocation = New-Object System.Drawing.Point(254, 74)
#$FixWhitelist.Font = 'Microsoft Sans Serif,10'
$InstallNet35 = New-Object s ystem. Windows . Forms . Button
$InstallNet35 . t ext = " Install .NET v3.5 "
$InstallNet35 . w idth = 152
$InstallNet35 . h eight = 39
$InstallNet35 . l ocation = New-Object System . Drawing . Point ( 169 , 335 )
$InstallNet35 = New-Object S ystem. Windows . Forms . Button
$InstallNet35 . T ext = " Install .NET v3.5 "
$InstallNet35 . W idth = 152
$InstallNet35 . H eight = 39
$InstallNet35 . L ocation = New-Object System . Drawing . Point ( 169 , 335 )
$InstallNet35 . Font = 'Microsoft Sans Serif,10'
$EnableDarkMode = New-Object s ystem. Windows . Forms . Button
$EnableDarkMode . t ext = " Enable Dark Mode "
$EnableDarkMode . w idth = 152
$EnableDarkMode . h eight = 39
$EnableDarkMode . l ocation = New-Object System . Drawing . Point ( 9 , 335 )
$EnableDarkMode = New-Object S ystem. Windows . Forms . Button
$EnableDarkMode . T ext = " Enable Dark Mode "
$EnableDarkMode . W idth = 152
$EnableDarkMode . H eight = 39
$EnableDarkMode . L ocation = New-Object System . Drawing . Point ( 9 , 335 )
$EnableDarkMode . Font = 'Microsoft Sans Serif,10'
$DisableDarkMode = New-Object s ystem. Windows . Forms . Button
$DisableDarkMode . t ext = " Disable Dark Mode "
$DisableDarkMode . w idth = 152
$DisableDarkMode . h eight = 39
$DisableDarkMode . l ocation = New-Object System . Drawing . Point ( 9 , 385 )
$DisableDarkMode = New-Object S ystem. Windows . Forms . Button
$DisableDarkMode . T ext = " Disable Dark Mode "
$DisableDarkMode . W idth = 152
$DisableDarkMode . H eight = 39
$DisableDarkMode . L ocation = New-Object System . Drawing . Point ( 9 , 385 )
$DisableDarkMode . Font = 'Microsoft Sans Serif,10'
@ -347,33 +355,33 @@ $Form.controls.AddRange(@($Debloat, $CustomizeBlacklists, $RemoveAllBloatware, $
$DebloatFolder = " C:\Temp\Windows10Debloater "
If ( Test-Path $DebloatFolder ) {
Write-Host " $ DebloatFolder exists. Skipping. "
Write-Host " $ { DebloatFolder} exists. Skipping. "
}
Else {
Write-Host " The folder " $DebloatFolder " doesn't exist. This folder will be used for storing logs created after the script runs. Creating now. "
Write-Host " The folder ${DebloatFolder} doesn't exist. This folder will be used for storing logs created after the script runs. Creating now. "
Start-Sleep 1
New-Item -Path " $ DebloatFolder" -ItemType Directory
Write-Host " The folder $ DebloatFolder was successfully created. "
New-Item -Path " $ { DebloatFolder} " -ItemType Directory
Write-Host " The folder $ { DebloatFolder} was successfully created. "
}
Start-Transcript -OutputDirectory " $ DebloatFolder"
Start-Transcript -OutputDirectory " $ { DebloatFolder} "
#region gui events {
$CustomizeBlacklists . Add_Click ( {
$CustomizeForm = New-Object s ystem. Windows . Forms . Form
$CustomizeForm = New-Object S ystem. Windows . Forms . Form
$CustomizeForm . ClientSize = '600,400'
$CustomizeForm . t ext = " Customize Whitelist and Blacklist "
$CustomizeForm . T ext = " Customize Whitelist and Blacklist "
$CustomizeForm . TopMost = $false
$CustomizeForm . AutoScroll = $true
$SaveList = New-Object s ystem. Windows . Forms . Button
$SaveList . t ext = " Save custom Whitelist and Blacklist to custom-lists.ps1 "
$SaveList = New-Object S ystem. Windows . Forms . Button
$SaveList . T ext = " Save custom Whitelist and Blacklist to custom-lists.ps1 "
$SaveList . AutoSize = $true
$SaveList . l ocation = New-Object System . Drawing . Point ( 200 , 5 )
$SaveList . L ocation = New-Object System . Drawing . Point ( 200 , 5 )
$CustomizeForm . controls . Add ( $SaveList )
$SaveList . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
'$global:WhiteListedApps = @(' | Out-File -FilePath $PSScriptRoot \ custom-lists . ps1 -Encoding utf8
@ ( $CustomizeForm . controls ) | ForEach {
@ -413,17 +421,17 @@ $CustomizeBlacklists.Add_Click( {
[ string ] $notes
)
$label = New-Object s ystem. Windows . Forms . Label
$label = New-Object S ystem. Windows . Forms . Label
$label . Location = New-Object System . Drawing . Point ( 2 , ( 30 + $position * 16 ) )
$label . Text = $notes
$label . w idth = 300
$label . h eight = 16
$label . W idth = 300
$label . H eight = 16
$Label . TextAlign = [ System.Drawing.ContentAlignment ] :: TopRight
$CustomizeForm . controls . Add ( $label )
$Checkbox = New-Object s ystem. Windows . Forms . CheckBox
$Checkbox . t ext = $appName
$Checkbox . l ocation = New-Object System . Drawing . Point ( 320 , ( 30 + $position * 16 ) )
$Checkbox = New-Object S ystem. Windows . Forms . CheckBox
$Checkbox . T ext = $appName
$Checkbox . L ocation = New-Object System . Drawing . Point ( 320 , ( 30 + $position * 16 ) )
$Checkbox . Autosize = 1 ;
$Checkbox . Checked = $checked
$Checkbox . Enabled = $enabled
@ -436,7 +444,7 @@ $CustomizeBlacklists.Add_Click( {
$AllUsers = @ ( ( Get-AppxPackage -AllUsers ) . Name )
[ int ] $checkboxCounter = 0
fore ach ( $item in $NonRemovables ) {
ForE ach ( $item in $NonRemovables ) {
$string = " "
if ( $null -notmatch $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { $string + = " ConflictBlacklist " }
if ( $null -notmatch $global:WhiteListedAppsRegex -and $item -cmatch $global:WhiteListedAppsRegex ) { $string + = " ConflictWhitelist " }
@ -447,7 +455,7 @@ $CustomizeBlacklists.Add_Click( {
AddAppToCustomizeForm $checkboxCounter $item $false $false $string
+ + $checkboxCounter
}
fore ach ( $item in $global:WhiteListedApps ) {
ForE ach ( $item in $global:WhiteListedApps ) {
$string = " "
if ( $null -notmatch $NonRemovables -and $NonRemovables -cmatch $item ) { $string + = " Conflict NonRemovables " }
if ( $null -notmatch $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { $string + = " ConflictBlacklist " }
@ -457,7 +465,7 @@ $CustomizeBlacklists.Add_Click( {
AddAppToCustomizeForm $checkboxCounter $item $true $false $string
+ + $checkboxCounter
}
fore ach ( $item in $global:Bloatware ) {
ForE ach ( $item in $global:Bloatware ) {
$string = " "
if ( $null -notmatch $NonRemovables -and $NonRemovables -cmatch $item ) { $string + = " Conflict NonRemovables " }
if ( $null -notmatch $global:WhiteListedAppsRegex -and $item -cmatch $global:WhiteListedAppsRegex ) { $string + = " Conflict Whitelist " }
@ -467,7 +475,7 @@ $CustomizeBlacklists.Add_Click( {
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
+ + $checkboxCounter
}
fore ach ( $item in $AllUsers ) {
ForE ach ( $item in $AllUsers ) {
$string = " NEW AllUsers "
if ( $null -notmatch $NonRemovables -and $NonRemovables -cmatch $item ) { continue }
if ( $null -notmatch $global:WhiteListedAppsRegex -and $item -cmatch $global:WhiteListedAppsRegex ) { continue }
@ -477,7 +485,7 @@ $CustomizeBlacklists.Add_Click( {
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
+ + $checkboxCounter
}
fore ach ( $item in $Installed ) {
ForE ach ( $item in $Installed ) {
$string = " NEW Installed "
if ( $null -notmatch $NonRemovables -and $NonRemovables -cmatch $item ) { continue }
if ( $null -notmatch $global:WhiteListedAppsRegex -and $item -cmatch $global:WhiteListedAppsRegex ) { continue }
@ -487,7 +495,7 @@ $CustomizeBlacklists.Add_Click( {
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
+ + $checkboxCounter
}
fore ach ( $item in $Online ) {
ForE ach ( $item in $Online ) {
$string = " NEW Online "
if ( $null -notmatch $NonRemovables -and $NonRemovables -cmatch $item ) { continue }
if ( $null -notmatch $global:WhiteListedAppsRegex -and $item -cmatch $global:WhiteListedAppsRegex ) { continue }
@ -503,7 +511,7 @@ $CustomizeBlacklists.Add_Click( {
$RemoveBlacklist . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
Function DebloatBlacklist {
Write-Host " Requesting removal of $global:BloatwareRegex "
Write-Host " --- This may take a while - please be patient --- "
@ -518,7 +526,7 @@ $RemoveBlacklist.Add_Click( {
Write-Host " Bloatware removed! "
} )
$RemoveAllBloatware . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
#This function finds any AppX/AppXProvisioned package and uninstalls it, except for Freshpaint, Windows Calculator, Windows Store, and Windows Photos.
#Also, to note - This does NOT remove essential system services/software/etc such as .NET framework installations, Cortana, Edge, etc.
@ -777,7 +785,7 @@ $RemoveAllBloatware.Add_Click( {
} )
$RevertChange . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
#This function will revert the changes you made when running the Start-Debloat function.
#This line reinstalls all of the bloatware that was removed
@ -872,7 +880,7 @@ $RevertChange.Add_Click( {
Write-Host " Done reverting changes! "
#
Write-Output " Restoring 3D Objects from e xplorer 'My Computer' submenu"
Write-Output " Restoring 3D Objects from E xplorer 'My Computer' submenu"
$Objects32 = " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} "
$Objects64 = " HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} "
If ( ! ( Test-Path $Objects32 ) ) {
@ -883,7 +891,7 @@ $RevertChange.Add_Click( {
}
} )
$DisableCortana . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
Write-Host " Disabling Cortana "
$Cortana1 = " HKCU:\SOFTWARE\Microsoft\Personalization\Settings "
$Cortana2 = " HKCU:\SOFTWARE\Microsoft\InputPersonalization "
@ -904,7 +912,7 @@ $DisableCortana.Add_Click( {
Write-Host " Cortana has been disabled. "
} )
$StopEdgePDFTakeover . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
#Stops edge from taking over as the default .PDF viewer
Write-Host " Stopping Edge from taking over as the default .PDF viewer "
$NoPDF = " HKCR:\.pdf "
@ -937,7 +945,7 @@ $StopEdgePDFTakeover.Add_Click( {
Write-Host " Edge should no longer take over as the default .PDF. "
} )
$EnableCortana . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
Write-Host " Re-enabling Cortana "
$Cortana1 = " HKCU:\SOFTWARE\Microsoft\Personalization\Settings "
$Cortana2 = " HKCU:\SOFTWARE\Microsoft\InputPersonalization "
@ -959,7 +967,7 @@ $EnableCortana.Add_Click( {
} )
$EnableEdgePDFTakeover . Add_Click ( {
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
Write-Host " Setting Edge back to default "
$NoPDF = " HKCR:\.pdf "
$NoProgids = " HKCR:\.pdf\OpenWithProgids "
@ -992,7 +1000,7 @@ $EnableEdgePDFTakeover.Add_Click( {
Write-Host " Edge will now be able to be used for .PDF. "
} )
$DisableTelemetry . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
#Disables Windows Feedback Experience
Write-Host " Disabling Windows Feedback Experience program "
$Advertising = " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo "
@ -1036,12 +1044,12 @@ $DisableTelemetry.Add_Click( {
If ( ! ( Test-Path $registryOEM ) ) {
New-Item $registryOEM
}
Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0
Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0
#Preping mixed Reality Portal for removal
Write-Host " Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings "
@ -1110,12 +1118,12 @@ $DisableTelemetry.Add_Click( {
#Disables scheduled tasks that are considered unnecessary
Write-Host " Disabling scheduled tasks "
#Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask
Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask
Get-ScheduledTask Consolidator | Disable-ScheduledTask
Get-ScheduledTask UsbCeip | Disable-ScheduledTask
Get-ScheduledTask DmClient | Disable-ScheduledTask
Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask
#Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask
Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask
Get-ScheduledTask Consolidator | Disable-ScheduledTask
Get-ScheduledTask UsbCeip | Disable-ScheduledTask
Get-ScheduledTask DmClient | Disable-ScheduledTask
Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask
#Write-Host "Uninstalling Telemetry Windows Updates"
#Uninstalls Some Windows Updates considered to be Telemetry. !WIP!
@ -1136,7 +1144,7 @@ $DisableTelemetry.Add_Click( {
Write-Host " Telemetry has been disabled! "
} )
$RemoveRegkeys . Add_Click ( {
$ErrorActionPreference = ' silentlyc ontinue'
$ErrorActionPreference = ' SilentlyC ontinue'
$Keys = @ (
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT