Files
Win11Debloat/Win10Debloat.ps1

156 lines
6.0 KiB
PowerShell
Raw Normal View History

Write-Output "-------------------------------------------------------------------------------------------"
Write-Output "Win10Debloat Script - Setup"
Write-Output "-------------------------------------------------------------------------------------------"
Write-Output "(1) Run Win10Debloat with the default settings"
Write-Output "(2) Advanced: Choose which changes you want Win10Debloat to make"
Write-Output ""
Do { $script_mode = Read-Host "Please select an option (1/2)" }
while ($script_mode -ne '1' -and $script_mode -ne '2')
2020-10-27 23:26:39 +01:00
if ($script_mode -eq '1'){
Clear
Write-Output "-------------------------------------------------------------------------------------------"
Write-Output "Win10Debloat Script - Default Configuration"
Write-Output "-------------------------------------------------------------------------------------------"
}
elseif ($script_mode -eq '2') {
Clear
Write-Output "-------------------------------------------------------------------------------------------"
Write-Output "Win10Debloat Script - Advanced Configuration"
Write-Output "-------------------------------------------------------------------------------------------"
$remove_apps = Read-Host "Remove the pre-installed windows 10 apps? (y/n)"
2020-10-27 23:26:39 +01:00
$disable_onedrive = Read-Host "Hide the onedrive folder in windows explorer? (y/n)"
2020-10-27 23:26:39 +01:00
$disable_3d_objects = Read-Host "Hide the 3D objects folder in windows explorer? (y/n)"
$disable_music = Read-Host "Hide the music folder in windows explorer? (y/n)"
$disable_bing_searches = Read-Host "Disable bing in windows search? (y/n)"
2020-10-27 23:26:39 +01:00
$disable_lockscreen_tips = Read-Host "Disable tips & tricks on the lockscreen? (y/n)"
$disable_windows_suggestions = Read-Host "Disable tips, tricks and suggestions in the startmenu and settings? (y/n)"
$disable_context = Read-Host "Disable the contextmenu entries for: Share, Give access to and Include in library? (y/n)"
Write-Output ""
}
2020-10-27 23:26:39 +01:00
if ($remove_apps -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Removing pre-installed windows 10 apps..."
2020-10-27 23:26:39 +01:00
$apps = @(
# These apps will be uninstalled by default:
#
# If you wish to KEEP any of the apps below simply add a # character
# in front of the specific app in the list below.
2020-10-27 23:26:39 +01:00
"*Microsoft.GetHelp*"
"*Microsoft.Getstarted*"
"*Microsoft.WindowsFeedbackHub*"
"*Microsoft.BingNews*"
"*Microsoft.BingFinance*"
"*Microsoft.BingSports*"
"*Microsoft.BingWeather*"
"*Microsoft.BingTranslator*"
2020-10-27 23:26:39 +01:00
"*Microsoft.MicrosoftOfficeHub*"
"*Microsoft.Office.OneNote*"
"*Microsoft.MicrosoftStickyNotes*"
"*Microsoft.SkypeApp*"
2020-10-27 23:26:39 +01:00
"*Microsoft.OneConnect*"
"*Microsoft.Messaging*"
"*Microsoft.WindowsSoundRecorder*"
"*Microsoft.ZuneMusic*"
"*Microsoft.ZuneVideo*"
2020-10-27 23:26:39 +01:00
"*Microsoft.MixedReality.Portal*"
"*Microsoft.3DBuilder*"
"*Microsoft.Microsoft3DViewer*"
"*Microsoft.Print3D*"
"*Microsoft.549981C3F5F10*" #Cortana app
2020-10-27 23:26:39 +01:00
"*Microsoft.MicrosoftSolitaireCollection*"
"*Microsoft.Asphalt8Airborne*"
2020-10-27 23:26:39 +01:00
"*king.com.BubbleWitch3Saga*"
"*king.com.CandyCrushSodaSaga*"
"*king.com.CandyCrushSaga*"
# These apps will NOT be uninstalled by default:
#
# If you wish to REMOVE any of the apps below simply remove the #
# character in front of the specific app in the list below.
#"*Microsoft.WindowsStore*" # NOTE: This app cannot be reinstalled!
#"*Microsoft.WindowsCalculator*"
#"*Microsoft.Windows.Photos*"
#"*Microsoft.WindowsCamera*"
#"*Microsoft.WindowsAlarms*"
#"*Microsoft.WindowsMaps*"
#"*microsoft.windowscommunicationsapps*" # Mail & Calendar
#"*Microsoft.People*"
#"*Microsoft.ScreenSketch*"
#"*Microsoft.MSPaint*" # Paint 3D
#"*Microsoft.YourPhone*"
#"*Microsoft.XboxApp*"
#"*Microsoft.XboxGameOverlay*"
#"*Microsoft.XboxGamingOverlay*"
#"*Microsoft.XboxSpeechToTextOverlay*"
2020-10-27 23:26:39 +01:00
)
foreach ($app in $apps) {
Write-Output " Attempting to remove $app"
2020-10-27 23:26:39 +01:00
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage
}
}
if ($disable_onedrive -eq 'y') {
Write-Output "> Hiding the onedrive folder in windows explorer..."
2020-10-27 23:26:39 +01:00
regedit /s $PSScriptRoot\Regfiles\Hide_Onedrive_Folder.reg
2020-10-27 23:26:39 +01:00
}
if ($disable_3d_objects -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Hiding the 3D objects folder in windows explorer..."
2020-10-27 23:26:39 +01:00
regedit /s $PSScriptRoot\Regfiles\Hide_3D_Objects_Folder.reg
2020-10-27 23:26:39 +01:00
}
if ($disable_music -eq 'y') {
Write-Output "> Hiding the music folder in windows explorer..."
2020-10-27 23:26:39 +01:00
regedit /s $PSScriptRoot\Regfiles\Hide_Music_folder.reg
2020-10-27 23:26:39 +01:00
}
if ($disable_bing_searches -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Disabling bing in windows search..."
regedit /s $PSScriptRoot\Regfiles\Disable_Bing_Searches.reg
}
if ($disable_lockscreen_tips -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Disabling tips & tricks on the lockscreen..."
regedit /s $PSScriptRoot\Regfiles\Disable_Lockscreen_Tips.reg
}
if ($disable_windows_suggestions -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Disabling tips, tricks and suggestions in the startmenu and settings..."
regedit /s $PSScriptRoot\Regfiles\Disable_Windows_Suggestions.reg
}
if ($disable_context -eq 'y' -or $script_mode -eq '1') {
Write-Output "> Disabling contextmenu entries for: Share, Include in library & Give access..."
2020-10-27 23:26:39 +01:00
regedit /s $PSScriptRoot\Regfiles\Disable_Share_from_context_menu.reg
regedit /s $PSScriptRoot\Regfiles\Disable_Include_in_library_from_context_menu.reg
regedit /s $PSScriptRoot\Regfiles\Disable_Give_access_to_context_menu.reg
2020-10-27 23:26:39 +01:00
}
Write-Output ""
Write-Output "Script completed! Please restart your PC to make sure all changes are properly applied."
Write-Output ""
Write-Output "Press any key to continue..."
2020-10-27 23:26:39 +01:00
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")