mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-12-16 15:55:05 -06:00
Compare commits
24 Commits
2025.09.28
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71043ccc7d | ||
|
|
0971b72c48 | ||
|
|
d403a2284c | ||
|
|
990957e3ca | ||
|
|
fb343e2a70 | ||
|
|
977a0ecb2d | ||
|
|
cd29f6987a | ||
|
|
163117d703 | ||
|
|
7a1d4ff679 | ||
|
|
0e5b49fb19 | ||
|
|
8b2cadb37d | ||
|
|
186a2f08b7 | ||
|
|
e66103f57a | ||
|
|
6c201fc027 | ||
|
|
2d9e8530eb | ||
|
|
14ba4d529c | ||
|
|
f97a01e8a9 | ||
|
|
791232e097 | ||
|
|
75ef30e6fb | ||
|
|
c1a48120d3 | ||
|
|
dc30664001 | ||
|
|
5ae374dff3 | ||
|
|
6c97bbead0 | ||
|
|
f46618dfe2 |
@@ -29,8 +29,10 @@ Microsoft.Office.OneNote # Digital note-taking app (Univer
|
||||
Microsoft.Office.Sway # Presentation and storytelling app
|
||||
Microsoft.OneConnect # Mobile Operator management app (Replaced by Mobile Plans)
|
||||
Microsoft.Print3D # 3D printing preparation software
|
||||
Microsoft.PowerAutomateDesktop # Desktop automation tool (RPA)
|
||||
Microsoft.SkypeApp # Skype communication app (Universal Windows Platform version)
|
||||
Microsoft.Todos # To-do list and task management app
|
||||
Microsoft.Windows.DevHome # Developer dashboard and tool configuration utility, no longer supported
|
||||
Microsoft.WindowsAlarms # Alarms & Clock app
|
||||
Microsoft.WindowsFeedbackHub # App for providing feedback to Microsoft on Windows
|
||||
Microsoft.WindowsMaps # Mapping and navigation app
|
||||
@@ -103,17 +105,16 @@ XING # Professional networking platfor
|
||||
#Microsoft.Edge # Edge browser (Can only be uninstalled in European Economic Area)
|
||||
#Microsoft.GamingApp # Modern Xbox Gaming App, required for installing some PC games
|
||||
#Microsoft.GetHelp # Required for some Windows 11 Troubleshooters and support interactions
|
||||
#Microsoft.M365Companions # Microsoft 365 (Business) Calendar, Files and People mini-apps, these apps may be reinstalled if enabled by your Microsoft 365 admin
|
||||
#Microsoft.MSPaint # Paint 3D (Modern paint application with 3D features)
|
||||
#Microsoft.OneDrive # OneDrive consumer cloud storage client
|
||||
#Microsoft.OutlookForWindows # New mail app: Outlook for Windows
|
||||
#Microsoft.Paint # Classic Paint (Traditional 2D paint application)
|
||||
#Microsoft.People # Required for & included with Mail & Calendar (Contacts management)
|
||||
#Microsoft.PowerAutomateDesktop # Desktop automation tool (RPA)
|
||||
#Microsoft.RemoteDesktop # Remote Desktop client app
|
||||
#Microsoft.ScreenSketch # Snipping Tool (Screenshot and annotation tool)
|
||||
#Microsoft.StartExperiencesApp # This app powers Windows Widgets My Feed
|
||||
#Microsoft.Whiteboard # Digital collaborative whiteboard app
|
||||
#Microsoft.Windows.DevHome # Developer dashboard and tool configuration utility
|
||||
#Microsoft.Windows.Photos # Default photo viewing and basic editing app
|
||||
#Microsoft.WindowsCalculator # Calculator app
|
||||
#Microsoft.WindowsCamera # Camera app for using built-in or connected cameras
|
||||
|
||||
7
Assets/Menus/Info
Normal file → Executable file
7
Assets/Menus/Info
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
Win11Debloat is a lightweight and easy to use PowerShell script that allows you to quickly
|
||||
Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly
|
||||
declutter and improve your Windows experience. It can remove pre-installed bloatware apps,
|
||||
disable telemetry, remove intrusive interface elements and much more.
|
||||
|
||||
@@ -43,6 +43,7 @@ File Explorer
|
||||
Taskbar
|
||||
- Align taskbar icons to the left. (W11 only)
|
||||
- Choose combine mode for taskbar buttons and labels. (W11 only)
|
||||
- Choose how app icons are shown on the taskbar when using multiple monitors. (W11 only)
|
||||
- Hide or change the search icon/box on the taskbar. (W11 only)
|
||||
- Hide the taskview button from the taskbar. (W11 only)
|
||||
- Disable widgets on the taskbar & lockscreen.
|
||||
@@ -55,9 +56,11 @@ Start
|
||||
- Disable the Phone Link mobile devices integration in the start menu. (W11 only)
|
||||
|
||||
Other
|
||||
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
||||
- Disable Xbox Game Bar integration & game/screen recording. This also disables `ms-gamingoverlay`/`ms-gamebar` popups.
|
||||
- Disable Fast Start-up to ensure a full shutdown.
|
||||
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||
|
||||
Advanced Features
|
||||
- Option to apply changes to a different user, instead of the currently logged in user.
|
||||
- Sysprep mode to apply changes to the Windows Default user profile.
|
||||
|
||||
|
||||
19
Get.ps1
19
Get.ps1
@@ -13,11 +13,11 @@ param (
|
||||
[switch]$RemoveAppsCustom,
|
||||
[switch]$RemoveGamingApps,
|
||||
[switch]$RemoveCommApps,
|
||||
[switch]$RemoveDevApps,
|
||||
[switch]$RemoveHPApps,
|
||||
[switch]$RemoveW11Outlook,
|
||||
[switch]$ForceRemoveEdge,
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableGameBarIntegration,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
@@ -36,6 +36,8 @@ param (
|
||||
[switch]$DisableAnimations,
|
||||
[switch]$TaskbarAlignLeft,
|
||||
[switch]$CombineTaskbarAlways, [switch]$CombineTaskbarWhenFull, [switch]$CombineTaskbarNever,
|
||||
[switch]$CombineMMTaskbarAlways, [switch]$CombineMMTaskbarWhenFull, [switch]$CombineMMTaskbarNever,
|
||||
[switch]$MMTaskbarModeAll, [switch]$MMTaskbarModeMainActive, [switch]$MMTaskbarModeActive,
|
||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||
[switch]$HideTaskview,
|
||||
[switch]$DisableStartRecommended,
|
||||
@@ -63,6 +65,7 @@ param (
|
||||
[switch]$ExplorerToThisPC,
|
||||
[switch]$ExplorerToDownloads,
|
||||
[switch]$ExplorerToOneDrive,
|
||||
[switch]$NoRestartExplorer,
|
||||
[switch]$DisableOnedrive, [switch]$HideOnedrive,
|
||||
[switch]$Disable3dObjects, [switch]$Hide3dObjects,
|
||||
[switch]$DisableMusic, [switch]$HideMusic,
|
||||
@@ -87,8 +90,18 @@ Write-Output "------------------------------------------------------------------
|
||||
|
||||
Write-Output "> Downloading Win11Debloat..."
|
||||
|
||||
# Download latest version of Win11Debloat from github as zip archive
|
||||
Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.09.28 -OutFile "$env:TEMP/win11debloat.zip"
|
||||
# Download latest version of Win11Debloat from GitHub as zip archive
|
||||
try {
|
||||
$LatestReleaseUri = (Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/releases/latest).zipball_url
|
||||
Invoke-RestMethod $LatestReleaseUri -OutFile "$env:TEMP/win11debloat.zip"
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: Unable to fetch latest release from GitHub. Please check your internet connection and try again." -ForegroundColor Red
|
||||
Write-Output ""
|
||||
Write-Output "Press enter to exit..."
|
||||
Read-Host | Out-Null
|
||||
Exit
|
||||
}
|
||||
|
||||
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
|
||||
if (Test-Path "$env:TEMP/Win11Debloat") {
|
||||
|
||||
162
README.md
Normal file → Executable file
162
README.md
Normal file → Executable file
@@ -18,7 +18,7 @@
|
||||
[](https://github.com/Raphire/Win11Debloat/discussions)
|
||||
[](https://github.com/Raphire/Win11Debloat/wiki/)
|
||||
|
||||
Win11Debloat is a simple, easy to use and lightweight PowerShell script that allows you to quickly declutter and improve your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. No need to painstakingly go through all the settings yourself or remove apps one by one. Win11Debloat makes the process quick and easy!
|
||||
Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and improve your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. No need to painstakingly go through all the settings yourself or remove apps one by one. Win11Debloat makes the process quick and easy!
|
||||
|
||||
The script also includes many features that system administrators will enjoy. Such as support for Windows Audit mode, the option to make changes to other Windows users and the ability to run the script without requiring user input during runtime. Please refer to our [wiki](https://github.com/Raphire/Win11Debloat/wiki/) for more details.
|
||||
|
||||
@@ -137,6 +137,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
||||
|
||||
- Align taskbar icons to the left. (W11 only)
|
||||
- Choose combine mode for taskbar buttons and labels. (W11 only)
|
||||
- Choose how app icons are shown on the taskbar when using multiple monitors. (W11 only)
|
||||
- Hide or change the search icon/box on the taskbar. (W11 only)
|
||||
- Hide the taskview button from the taskbar. (W11 only)
|
||||
- Disable widgets on the taskbar & lockscreen.
|
||||
@@ -151,11 +152,14 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
||||
|
||||
#### Other
|
||||
|
||||
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
||||
- Disable Xbox Game Bar integration & game/screen recording. This also disables `ms-gamingoverlay`/`ms-gamebar` popups if you uninstall the Xbox Game Bar.
|
||||
- Disable Fast Start-up to ensure a full shutdown.
|
||||
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||
|
||||
#### Advanced Features
|
||||
|
||||
- Option to [apply changes to a different user](https://github.com/Raphire/Win11Debloat/wiki/Advanced-Features#running-as-another-user), instead of the currently logged in user.
|
||||
- [Sysprep mode](https://github.com/Raphire/Win11Debloat/wiki/Advanced-Features#sysprep-mode) to apply changes to the Windows Default user profile. Afterwards, all new users will have the changes automatically applied to them.
|
||||
- [Sysprep mode](https://github.com/Raphire/Win11Debloat/wiki/Advanced-Features#sysprep-mode) to apply changes to the Windows Default user profile. Which ensures, all new users will have the changes automatically applied to them.
|
||||
|
||||
### Default Settings
|
||||
|
||||
@@ -190,50 +194,50 @@ These apps are uninstalled when you opt to remove the default selection of apps.
|
||||
<summary>Click to expand</summary>
|
||||
<blockquote>
|
||||
|
||||
Microsoft bloat:
|
||||
- Clipchamp.Clipchamp
|
||||
- Microsoft.3DBuilder
|
||||
- Microsoft.549981C3F5F10 (Cortana app)
|
||||
- Microsoft.BingFinance
|
||||
- Microsoft.BingFoodAndDrink
|
||||
- Microsoft.BingHealthAndFitness
|
||||
- Microsoft.BingNews
|
||||
- Microsoft.BingSearch* (Bing web search in Windows)
|
||||
- Microsoft.BingSports
|
||||
- Microsoft.BingTranslator
|
||||
- Microsoft.BingTravel
|
||||
- Microsoft.BingWeather
|
||||
- Microsoft.Copilot
|
||||
- Microsoft.Getstarted (Cannot be uninstalled in Windows 11)
|
||||
- Microsoft.Messaging
|
||||
- Microsoft.Microsoft3DViewer
|
||||
- Microsoft.MicrosoftJournal
|
||||
- Microsoft.MicrosoftOfficeHub
|
||||
- Microsoft.MicrosoftPowerBIForWindows
|
||||
- Microsoft.MicrosoftSolitaireCollection
|
||||
- Microsoft.MicrosoftStickyNotes
|
||||
- Microsoft.MixedReality.Portal
|
||||
- Microsoft.NetworkSpeedTest
|
||||
- Microsoft.News
|
||||
- Microsoft.Office.OneNote (Discontinued UWP version only, does not remove new MS365 versions)
|
||||
- Microsoft.Office.Sway
|
||||
- Microsoft.OneConnect
|
||||
- Microsoft.Print3D
|
||||
- Microsoft.StartExperiencesApp** (Widgets app)
|
||||
- Microsoft.SkypeApp
|
||||
- Microsoft.Todos
|
||||
- Microsoft.WindowsAlarms
|
||||
- Microsoft.WindowsFeedbackHub
|
||||
- Microsoft.WindowsMaps
|
||||
- Microsoft.WindowsSoundRecorder
|
||||
Microsoft apps:
|
||||
- Clipchamp.Clipchamp (Video editor from Microsoft)
|
||||
- Microsoft.3DBuilder (Basic 3D modeling software)
|
||||
- Microsoft.549981C3F5F10 (Cortana app, discontinued)
|
||||
- Microsoft.BingFinance (Finance news and tracking via Bing, discontinued)
|
||||
- Microsoft.BingFoodAndDrink (Recipes and food news via Bing, discontinued)
|
||||
- Microsoft.BingHealthAndFitness (Health and fitness tracking/news via Bing, discontinued)
|
||||
- Microsoft.BingNews (News aggregator via Bing, replaced by Microsoft News/Start)
|
||||
- Microsoft.BingSports (Sports news and scores via Bing, discontinued)
|
||||
- Microsoft.BingTranslator (Translation service via Bing)
|
||||
- Microsoft.BingTravel (Travel planning and news via Bing, discontinued)
|
||||
- Microsoft.BingWeather (Weather forecast via Bing)
|
||||
- Microsoft.Copilot (AI assistant integrated into Windows)
|
||||
- Microsoft.Getstarted (Tips and introductory guide for Windows, cannot be uninstalled in Windows 11)
|
||||
- Microsoft.Messaging (Messaging app, often integrates with Skype, largely deprecated)
|
||||
- Microsoft.Microsoft3DViewer (Viewer for 3D models)
|
||||
- Microsoft.MicrosoftJournal (Digital note-taking app optimized for pen input)
|
||||
- Microsoft.MicrosoftOfficeHub (Hub to access Microsoft Office apps and documents, precursor to Microsoft 365 app)
|
||||
- Microsoft.MicrosoftPowerBIForWindows (Business analytics service client)
|
||||
- Microsoft.MicrosoftSolitaireCollection (Collection of solitaire card games)
|
||||
- Microsoft.MicrosoftStickyNotes (Digital sticky notes app, deprecated & replaced by OneNote)
|
||||
- Microsoft.MixedReality.Portal (Portal for Windows Mixed Reality headsets)
|
||||
- Microsoft.NetworkSpeedTest (Internet connection speed test utility)
|
||||
- Microsoft.News (News aggregator. Replaced Bing News and now part of Microsoft Start)
|
||||
- Microsoft.Office.OneNote (Digital note-taking app, Universal Windows Platform version)
|
||||
- Microsoft.Office.Sway (Presentation and storytelling app)
|
||||
- Microsoft.OneConnect (Mobile Operator management app, replaced by Mobile Plans)
|
||||
- Microsoft.PowerAutomateDesktop (Desktop automation tool)
|
||||
- Microsoft.Print3D (3D printing preparation software)
|
||||
- Microsoft.SkypeApp (Skype communication app, Universal Windows Platform version)
|
||||
- Microsoft.Todos (To-do list and task management app)
|
||||
- Microsoft.Windows.DevHome (Developer dashboard and tool configuration utility, no longer supported)
|
||||
- Microsoft.WindowsAlarms (Alarms & Clock app)
|
||||
- Microsoft.WindowsFeedbackHub (App for providing feedback to Microsoft on Windows)
|
||||
- Microsoft.WindowsMaps (Mapping and navigation app)
|
||||
- Microsoft.WindowsSoundRecorder (Basic audio recording app)
|
||||
- Microsoft.XboxApp (Old Xbox Console Companion App, no longer supported)
|
||||
- Microsoft.ZuneVideo
|
||||
- MicrosoftCorporationII.MicrosoftFamily (Microsoft Family Safety)
|
||||
- Microsoft.ZuneVideo (Movies & TV app for renting/buying/playing video content. Rebranded as "Films & TV")
|
||||
- MicrosoftCorporationII.MicrosoftFamily (Family Safety App for managing family accounts and settings)
|
||||
- MicrosoftCorporationII.QuickAssist (Remote assistance tool)
|
||||
- MicrosoftTeams (Old personal version of MS Teams from the MS Store)
|
||||
- MSTeams (New MS Teams app)
|
||||
- MicrosoftTeams (Old MS Teams personal, MS Store version)
|
||||
- MSTeams (New MS Teams app. Work/School or Personal)
|
||||
|
||||
Third party bloat:
|
||||
Third party apps:
|
||||
- ACGMediaPlayer
|
||||
- ActiproSoftwareLLC
|
||||
- AdobeSystemsIncorporated.AdobePhotoshopExpress
|
||||
@@ -282,9 +286,6 @@ These apps are uninstalled when you opt to remove the default selection of apps.
|
||||
- WinZipUniversal
|
||||
- Wunderlist
|
||||
- XING
|
||||
|
||||
* Removed when disabling Bing web search, Bing AI and Cortana from Windows search
|
||||
** Removed when disabling widgets on the taskbar & lockscreen
|
||||
</blockquote>
|
||||
</details>
|
||||
|
||||
@@ -296,21 +297,23 @@ These apps will not be removed by Win11Debloat unless explicitly selected by the
|
||||
<summary>Click to expand</summary>
|
||||
<blockquote>
|
||||
|
||||
General apps that are not removed by default:
|
||||
Miscellaneous apps:
|
||||
- Microsoft.Edge (Edge browser, only removeable in the EEA)
|
||||
- Microsoft.GetHelp (Required for some Windows 11 Troubleshooters)
|
||||
- Microsoft.M365Companions (Microsoft 365 Business Calendar, Files and People mini-apps, these apps may be reinstalled if enabled by your Microsoft 365 admin)
|
||||
- Microsoft.MSPaint (Paint 3D)
|
||||
- Microsoft.OutlookForWindows* (New mail app)
|
||||
- Microsoft.OutlookForWindows (New mail app)
|
||||
- Microsoft.OneDrive (OneDrive consumer)
|
||||
- Microsoft.Paint (Classic Paint)
|
||||
- Microsoft.People* (Required for & included with Mail & Calendar)
|
||||
- Microsoft.People (Required for & included with Mail & Calendar)
|
||||
- Microsoft.RemoteDesktop
|
||||
- Microsoft.ScreenSketch (Snipping Tool)
|
||||
- Microsoft.Whiteboard (Only preinstalled on devices with touchscreen and/or pen support)
|
||||
- Microsoft.Windows.Photos
|
||||
- Microsoft.WindowsCalculator
|
||||
- Microsoft.WindowsCamera
|
||||
- Microsoft.WindowsNotepad
|
||||
- Microsoft.windowscommunicationsapps* (Mail & Calendar)
|
||||
- Microsoft.windowscommunicationsapps (Mail & Calendar)
|
||||
- Microsoft.WindowsStore (Microsoft Store, NOTE: This app cannot be reinstalled!)
|
||||
- Microsoft.WindowsTerminal (New default terminal app in Windows 11)
|
||||
- Microsoft.YourPhone (Phone Link)
|
||||
@@ -318,41 +321,34 @@ These apps will not be removed by Win11Debloat unless explicitly selected by the
|
||||
- Microsoft.ZuneMusic (Modern Media Player)
|
||||
- MicrosoftWindows.CrossDevice (Phone integration within File Explorer, Camera and more)
|
||||
|
||||
HP apps that are not removed by default:
|
||||
- AD2F1837.HPAIExperienceCenter*
|
||||
- AD2F1837.HPConnectedMusic*
|
||||
- AD2F1837.HPConnectedPhotopoweredbySnapfish*
|
||||
- AD2F1837.HPDesktopSupportUtilities*
|
||||
- AD2F1837.HPEasyClean*
|
||||
- AD2F1837.HPFileViewer*
|
||||
- AD2F1837.HPJumpStarts*
|
||||
- AD2F1837.HPPCHardwareDiagnosticsWindows*
|
||||
- AD2F1837.HPPowerManager*
|
||||
- AD2F1837.HPPrinterControl*
|
||||
- AD2F1837.HPPrivacySettings*
|
||||
- AD2F1837.HPQuickDrop*
|
||||
- AD2F1837.HPQuickTouch*
|
||||
- AD2F1837.HPRegistration*
|
||||
- AD2F1837.HPSupportAssistant*
|
||||
- AD2F1837.HPSureShieldAI*
|
||||
- AD2F1837.HPSystemInformation*
|
||||
- AD2F1837.HPWelcome*
|
||||
- AD2F1837.HPWorkWell*
|
||||
- AD2F1837.myHP*
|
||||
|
||||
Gaming related apps that are not removed by default:
|
||||
- Microsoft.GamingApp* (Modern Xbox Gaming App, required for installing some games)
|
||||
- Microsoft.XboxGameOverlay* (Game overlay, required for some games)
|
||||
- Microsoft.XboxGamingOverlay* (Game overlay, required for some games)
|
||||
Gaming related apps:
|
||||
- Microsoft.GamingApp (Modern Xbox Gaming App, required for installing some games)
|
||||
- Microsoft.XboxGameOverlay (Game overlay, required for some games)
|
||||
- Microsoft.XboxGamingOverlay (Game overlay, required for some games)
|
||||
- Microsoft.XboxIdentityProvider (Xbox sign-in framework, required for some games)
|
||||
- Microsoft.XboxSpeechToTextOverlay (Might be required for some games, NOTE: This app cannot be reinstalled!)
|
||||
|
||||
Developer related apps that are not removed by default:
|
||||
- Microsoft.PowerAutomateDesktop*
|
||||
- Microsoft.RemoteDesktop*
|
||||
- Windows.DevHome*
|
||||
|
||||
* Can be removed by running the script with the relevant parameter. (Please refer to the wiki for more details)
|
||||
HP apps:
|
||||
- AD2F1837.HPAIExperienceCenter
|
||||
- AD2F1837.HPConnectedMusic
|
||||
- AD2F1837.HPConnectedPhotopoweredbySnapfish
|
||||
- AD2F1837.HPDesktopSupportUtilities
|
||||
- AD2F1837.HPEasyClean
|
||||
- AD2F1837.HPFileViewer
|
||||
- AD2F1837.HPJumpStarts
|
||||
- AD2F1837.HPPCHardwareDiagnosticsWindows
|
||||
- AD2F1837.HPPowerManager
|
||||
- AD2F1837.HPPrinterControl
|
||||
- AD2F1837.HPPrivacySettings
|
||||
- AD2F1837.HPQuickDrop
|
||||
- AD2F1837.HPQuickTouch
|
||||
- AD2F1837.HPRegistration
|
||||
- AD2F1837.HPSupportAssistant
|
||||
- AD2F1837.HPSureShieldAI
|
||||
- AD2F1837.HPSystemInformation
|
||||
- AD2F1837.HPWelcome
|
||||
- AD2F1837.HPWorkWell
|
||||
- AD2F1837.myHP
|
||||
</blockquote>
|
||||
</details>
|
||||
|
||||
|
||||
BIN
Regfiles/Combine_MMTaskbar_Always.reg
Executable file
BIN
Regfiles/Combine_MMTaskbar_Always.reg
Executable file
Binary file not shown.
BIN
Regfiles/Combine_MMTaskbar_Never.reg
Executable file
BIN
Regfiles/Combine_MMTaskbar_Never.reg
Executable file
Binary file not shown.
BIN
Regfiles/Combine_MMTaskbar_When_Full.reg
Executable file
BIN
Regfiles/Combine_MMTaskbar_When_Full.reg
Executable file
Binary file not shown.
@@ -3,5 +3,8 @@ Windows Registry Editor Version 5.00
|
||||
[HKEY_CURRENT_USER\System\GameConfigStore]
|
||||
"GameDVR_Enabled"=dword:00000000
|
||||
|
||||
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR]
|
||||
"AppCaptureEnabled"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
|
||||
"AllowGameDVR"=dword:00000000
|
||||
|
||||
22
Regfiles/Disable_Game_Bar_Integration.reg
Normal file
22
Regfiles/Disable_Game_Bar_Integration.reg
Normal file
@@ -0,0 +1,22 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Disable allow your controller to open Game Bar
|
||||
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
|
||||
"UseNexusForGameBarEnabled"=dword:00000000
|
||||
|
||||
; Disable `ms-gamebar` popups
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar]
|
||||
@="URL:ms-gamebar"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=""
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
||||
@="%SystemRoot%/System32/systray.exe"
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebarservices]
|
||||
@="URL:ms-gamebarservices"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=""
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebarservices\shell\open\command]
|
||||
@="%SystemRoot%/System32/systray.exe"
|
||||
Binary file not shown.
BIN
Regfiles/MMTaskbarMode_Active.reg
Executable file
BIN
Regfiles/MMTaskbarMode_Active.reg
Executable file
Binary file not shown.
BIN
Regfiles/MMTaskbarMode_All.reg
Executable file
BIN
Regfiles/MMTaskbarMode_All.reg
Executable file
Binary file not shown.
BIN
Regfiles/MMTaskbarMode_Main_Active.reg
Executable file
BIN
Regfiles/MMTaskbarMode_Main_Active.reg
Executable file
Binary file not shown.
@@ -3,5 +3,8 @@ Windows Registry Editor Version 5.00
|
||||
[hkey_users\default\System\GameConfigStore]
|
||||
"GameDVR_Enabled"=dword:00000000
|
||||
|
||||
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR]
|
||||
"AppCaptureEnabled"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
|
||||
"AllowGameDVR"=dword:00000000
|
||||
|
||||
22
Regfiles/Sysprep/Disable_Game_Bar_Integration.reg
Normal file
22
Regfiles/Sysprep/Disable_Game_Bar_Integration.reg
Normal file
@@ -0,0 +1,22 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Disable allow your controller to open Game Bar
|
||||
[hkey_users\default\SOFTWARE\Microsoft\GameBar]
|
||||
"UseNexusForGameBarEnabled"=dword:00000000
|
||||
|
||||
; Disable `ms-gamebar` popups
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar]
|
||||
@="URL:ms-gamebar"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=""
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
||||
@="%SystemRoot%/System32/systray.exe"
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebarservices]
|
||||
@="URL:ms-gamebarservices"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=""
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
||||
@="%SystemRoot%/System32/systray.exe"
|
||||
Binary file not shown.
4
Regfiles/Sysprep/Uninstall_Microsoft_Edge.reg
Normal file
4
Regfiles/Sysprep/Uninstall_Microsoft_Edge.reg
Normal file
@@ -0,0 +1,4 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
|
||||
"UninstallMicrosoftEdge"="cmd.exe /c winget uninstall --accept-source-agreements --disable-interactivity --id Microsoft.Edge"
|
||||
9
Regfiles/Sysprep/Uninstall_Microsoft_OneDrive.reg
Normal file
9
Regfiles/Sysprep/Uninstall_Microsoft_OneDrive.reg
Normal file
@@ -0,0 +1,9 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Create task to remove OneDrive if it's already installed
|
||||
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
|
||||
"UninstallMicrosoftOneDrive"="cmd.exe /c winget uninstall --accept-source-agreements --disable-interactivity --id Microsoft.OneDrive"
|
||||
|
||||
; Remove task that installs OneDrive
|
||||
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
|
||||
"OneDriveSetup"=-
|
||||
@@ -3,5 +3,8 @@ Windows Registry Editor Version 5.00
|
||||
[HKEY_CURRENT_USER\System\GameConfigStore]
|
||||
"GameDVR_Enabled"=dword:00000001
|
||||
|
||||
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR]
|
||||
"AppCaptureEnabled"=dword:00000001
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
|
||||
"AllowGameDVR"=dword:00000001
|
||||
20
Regfiles/Undo/Enable_Game_Bar_Integration.reg
Normal file
20
Regfiles/Undo/Enable_Game_Bar_Integration.reg
Normal file
@@ -0,0 +1,20 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Enable allow your controller to open Game Bar
|
||||
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
|
||||
"UseNexusForGameBarEnabled"=dword:00000001
|
||||
|
||||
; Enable `ms-gamebar` popups
|
||||
[HKEY_CLASSES_ROOT\ms-gamebar]
|
||||
@="URL:ms-gamebar"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=-
|
||||
|
||||
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
||||
|
||||
[HKEY_CLASSES_ROOT\ms-gamebarservices]
|
||||
@="URL:ms-gamebarservices"
|
||||
"URL Protocol"=""
|
||||
"NoOpenWith"=-
|
||||
|
||||
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
||||
Binary file not shown.
694
Win11Debloat.ps1
Normal file → Executable file
694
Win11Debloat.ps1
Normal file → Executable file
@@ -15,11 +15,11 @@ param (
|
||||
[switch]$RemoveAppsCustom,
|
||||
[switch]$RemoveGamingApps,
|
||||
[switch]$RemoveCommApps,
|
||||
[switch]$RemoveDevApps,
|
||||
[switch]$RemoveHPApps,
|
||||
[switch]$RemoveW11Outlook,
|
||||
[switch]$ForceRemoveEdge,
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableGameBarIntegration,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
@@ -38,6 +38,8 @@ param (
|
||||
[switch]$DisableAnimations,
|
||||
[switch]$TaskbarAlignLeft,
|
||||
[switch]$CombineTaskbarAlways, [switch]$CombineTaskbarWhenFull, [switch]$CombineTaskbarNever,
|
||||
[switch]$CombineMMTaskbarAlways, [switch]$CombineMMTaskbarWhenFull, [switch]$CombineMMTaskbarNever,
|
||||
[switch]$MMTaskbarModeAll, [switch]$MMTaskbarModeMainActive, [switch]$MMTaskbarModeActive,
|
||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||
[switch]$HideTaskview,
|
||||
[switch]$DisableStartRecommended,
|
||||
@@ -65,6 +67,7 @@ param (
|
||||
[switch]$ExplorerToThisPC,
|
||||
[switch]$ExplorerToDownloads,
|
||||
[switch]$ExplorerToOneDrive,
|
||||
[switch]$NoRestartExplorer,
|
||||
[switch]$DisableOnedrive, [switch]$HideOnedrive,
|
||||
[switch]$Disable3dObjects, [switch]$Hide3dObjects,
|
||||
[switch]$DisableMusic, [switch]$HideMusic,
|
||||
@@ -74,6 +77,7 @@ param (
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Show error if current powershell environment is limited by security policies
|
||||
if ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") {
|
||||
Write-Host "Error: Win11Debloat is unable to run on your system, powershell execution is restricted by security policies" -ForegroundColor Red
|
||||
@@ -88,6 +92,16 @@ else {
|
||||
Start-Transcript -Path "$PSScriptRoot/Win11Debloat.log" -Append -IncludeInvocationHeader -Force | Out-Null
|
||||
}
|
||||
|
||||
|
||||
|
||||
##################################################################################################################
|
||||
# #
|
||||
# FUNCTION DEFINITIONS #
|
||||
# #
|
||||
##################################################################################################################
|
||||
|
||||
|
||||
|
||||
# Shows application selection form that allows the user to select what apps they want to remove or keep
|
||||
function ShowAppSelectionForm {
|
||||
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
|
||||
@@ -122,7 +136,7 @@ function ShowAppSelectionForm {
|
||||
# Create file that stores selected apps if it doesn't exist
|
||||
if (-not (Test-Path "$PSScriptRoot/CustomAppsList")) {
|
||||
$null = New-Item "$PSScriptRoot/CustomAppsList"
|
||||
}
|
||||
}
|
||||
|
||||
Set-Content -Path "$PSScriptRoot/CustomAppsList" -Value $script:SelectedApps
|
||||
|
||||
@@ -374,87 +388,65 @@ function RemoveApps {
|
||||
Foreach ($app in $appsList) {
|
||||
Write-Output "Attempting to remove $app..."
|
||||
|
||||
# Use winget only to remove OneDrive and Edge
|
||||
if (($app -eq "Microsoft.OneDrive") -or ($app -eq "Microsoft.Edge")) {
|
||||
# Use winget to remove OneDrive and Edge
|
||||
if ($script:wingetInstalled -eq $false) {
|
||||
Write-Host "Error: WinGet is either not installed or is outdated, $app could not be removed" -ForegroundColor Red
|
||||
continue
|
||||
}
|
||||
|
||||
$appName = $app -replace '\.', '_'
|
||||
|
||||
# Uninstall app via winget, or create a scheduled task to uninstall it later
|
||||
if ($script:Params.ContainsKey("User")) {
|
||||
RegImport "Adding scheduled task to uninstall $app for user $(GetUserName)..." "Uninstall_$($appName).reg"
|
||||
}
|
||||
elseif ($script:Params.ContainsKey("Sysprep")) {
|
||||
RegImport "Adding scheduled task to uninstall $app after new users log in..." "Uninstall_$($appName).reg"
|
||||
}
|
||||
else {
|
||||
# Uninstall app via winget
|
||||
Strip-Progress -ScriptBlock { winget uninstall --accept-source-agreements --disable-interactivity --id $app } | Tee-Object -Variable wingetOutput
|
||||
Strip-Progress -ScriptBlock { winget uninstall --accept-source-agreements --disable-interactivity --id $app } | Tee-Object -Variable wingetOutput
|
||||
}
|
||||
|
||||
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
|
||||
Write-Host "Unable to uninstall Microsoft Edge via Winget" -ForegroundColor Red
|
||||
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
|
||||
Write-Host "Unable to uninstall Microsoft Edge via Winget" -ForegroundColor Red
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt "Would you like to forcefully uninstall Edge? NOT RECOMMENDED! (y/n)" ) -eq 'y') {
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt "Would you like to forcefully uninstall Edge? NOT RECOMMENDED! (y/n)" ) -eq 'y') {
|
||||
Write-Output ""
|
||||
ForceRemoveEdge
|
||||
}
|
||||
ForceRemoveEdge
|
||||
}
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
# Use Remove-AppxPackage to remove all other apps
|
||||
$app = '*' + $app + '*'
|
||||
|
||||
# Remove installed app for all existing users
|
||||
try {
|
||||
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction Continue
|
||||
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Removed $app for all users" -ForegroundColor DarkGray
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Use Remove-AppxPackage to remove all other apps
|
||||
$app = '*' + $app + '*'
|
||||
|
||||
# Remove installed app for all existing users
|
||||
if ($WinVersion -ge 22000) {
|
||||
# Windows 11 build 22000 or later
|
||||
try {
|
||||
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction Continue
|
||||
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Removed $app for all users" -ForegroundColor DarkGray
|
||||
}
|
||||
}
|
||||
catch {
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Unable to remove $app for all users" -ForegroundColor Yellow
|
||||
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Windows 10
|
||||
try {
|
||||
Get-AppxPackage -Name $app | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Removed $app for current user" -ForegroundColor DarkGray
|
||||
}
|
||||
}
|
||||
catch {
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Unable to remove $app for current user" -ForegroundColor Yellow
|
||||
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Get-AppxPackage -Name $app -PackageTypeFilter Main, Bundle, Resource -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
|
||||
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Removed $app for all users" -ForegroundColor DarkGray
|
||||
}
|
||||
}
|
||||
catch {
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Unable to remove $app for all users" -ForegroundColor Yellow
|
||||
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Remove provisioned app from OS image, so the app won't be installed for any new users
|
||||
try {
|
||||
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
|
||||
}
|
||||
catch {
|
||||
Write-Host "Unable to remove $app from windows image" -ForegroundColor Yellow
|
||||
catch {
|
||||
if ($DebugPreference -ne "SilentlyContinue") {
|
||||
Write-Host "Unable to remove $app for all users" -ForegroundColor Yellow
|
||||
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
|
||||
# Remove provisioned app from OS image, so the app won't be installed for any new users
|
||||
try {
|
||||
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
|
||||
}
|
||||
catch {
|
||||
Write-Host "Unable to remove $app from windows image" -ForegroundColor Yellow
|
||||
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
@@ -535,7 +527,8 @@ function Strip-Progress {
|
||||
& $ScriptBlock 2>&1 | ForEach-Object {
|
||||
if ($_ -is [System.Management.Automation.ErrorRecord]) {
|
||||
"ERROR: $($_.Exception.Message)"
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$line = $_ -replace $progressPattern, '' -replace $sizePattern, ''
|
||||
if (-not ([string]::IsNullOrWhiteSpace($line)) -and -not ($line.StartsWith(' '))) {
|
||||
$line
|
||||
@@ -596,7 +589,8 @@ function GetUserDirectory {
|
||||
if ((Test-Path $userPath) -or ($userDirectoryExists -and (-not $exitIfPathNotFound))) {
|
||||
return $userPath
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: Something went wrong when trying to find the user directory path for user $userName. Please ensure the user exists on this system." -ForegroundColor Red
|
||||
AwaitKeyToExit
|
||||
}
|
||||
@@ -640,7 +634,7 @@ function RegImport {
|
||||
|
||||
# Restart the Windows Explorer process
|
||||
function RestartExplorer {
|
||||
if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User")) {
|
||||
if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User") -or $script:Params.ContainsKey("NoRestartExplorer")) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -741,7 +735,8 @@ function ReplaceStartMenu {
|
||||
if (Test-Path $startMenuBinFile) {
|
||||
# Backup current start menu file
|
||||
Move-Item -Path $startMenuBinFile -Destination $backupBinFile -Force
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Write-Host "Warning: Unable to find original start2.bin file for user $userName. No backup was created for this user!" -ForegroundColor Yellow
|
||||
New-Item -ItemType File -Path $startMenuBinFile -Force
|
||||
}
|
||||
@@ -774,7 +769,7 @@ function AddParameter {
|
||||
# Create or clear file that stores last used settings
|
||||
if (-not (Test-Path "$PSScriptRoot/SavedSettings")) {
|
||||
$null = New-Item "$PSScriptRoot/SavedSettings"
|
||||
}
|
||||
}
|
||||
elseif ($script:FirstSelection) {
|
||||
$null = Clear-Content "$PSScriptRoot/SavedSettings"
|
||||
}
|
||||
@@ -802,9 +797,9 @@ function PrintHeader {
|
||||
}
|
||||
|
||||
Clear-Host
|
||||
Write-Output "-------------------------------------------------------------------------------------------"
|
||||
Write-Output $fullTitle
|
||||
Write-Output "-------------------------------------------------------------------------------------------"
|
||||
Write-Host "-------------------------------------------------------------------------------------------"
|
||||
Write-Host $fullTitle
|
||||
Write-Host "-------------------------------------------------------------------------------------------"
|
||||
}
|
||||
|
||||
|
||||
@@ -823,7 +818,7 @@ function PrintFromFile {
|
||||
|
||||
# Get & print script menu from file
|
||||
Foreach ($line in (Get-Content -Path $path )) {
|
||||
Write-Output $line
|
||||
Write-Host $line
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,7 +875,8 @@ function CreateSystemRestorePoint {
|
||||
$enableSystemRestoreJob = Start-Job {
|
||||
try {
|
||||
Enable-ComputerRestore -Drive "$env:SystemDrive"
|
||||
} catch {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: Failed to enable System Restore: $_" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
@@ -891,10 +887,12 @@ function CreateSystemRestorePoint {
|
||||
if (-not $enableSystemRestoreJobDone) {
|
||||
Write-Host "Error: Failed to enable system restore and create restore point, operation timed out" -ForegroundColor Red
|
||||
return
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Receive-Job $enableSystemRestoreJob
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Write-Output ""
|
||||
return
|
||||
}
|
||||
@@ -904,7 +902,8 @@ function CreateSystemRestorePoint {
|
||||
# Find existing restore points that are less than 24 hours old
|
||||
try {
|
||||
$recentRestorePoints = Get-ComputerRestorePoint | Where-Object { (Get-Date) - [System.Management.ManagementDateTimeConverter]::ToDateTime($_.CreationTime) -le (New-TimeSpan -Hours 24) }
|
||||
} catch {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: Unable to retrieve existing restore points: $_" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
@@ -913,10 +912,12 @@ function CreateSystemRestorePoint {
|
||||
try {
|
||||
Checkpoint-Computer -Description "Restore point created by Win11Debloat" -RestorePointType "MODIFY_SETTINGS"
|
||||
Write-Output "System restore point created successfully"
|
||||
} catch {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: Unable to create restore point: $_" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Write-Host "A recent restore point already exists, no new restore point was created." -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
@@ -925,7 +926,8 @@ function CreateSystemRestorePoint {
|
||||
|
||||
if (-not $createRestorePointJobDone) {
|
||||
Write-Host "Error: Failed to create system restore point, operation timed out" -ForegroundColor Red
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Receive-Job $createRestorePointJob
|
||||
}
|
||||
|
||||
@@ -933,7 +935,162 @@ function CreateSystemRestorePoint {
|
||||
}
|
||||
|
||||
|
||||
function DisplayCustomModeOptions {
|
||||
function ShowScriptMenuOptions {
|
||||
Do {
|
||||
$ModeSelectionMessage = "Please select an option (1/2/3/0)"
|
||||
|
||||
PrintHeader 'Menu'
|
||||
|
||||
Write-Host "(1) Default mode: Quickly apply the recommended changes"
|
||||
Write-Host "(2) Custom mode: Manually select what changes to make"
|
||||
Write-Host "(3) App removal mode: Select & remove apps, without making other changes"
|
||||
|
||||
# Only show this option if SavedSettings file exists
|
||||
if (Test-Path "$PSScriptRoot/SavedSettings") {
|
||||
Write-Host "(4) Apply saved custom settings from last time"
|
||||
|
||||
$ModeSelectionMessage = "Please select an option (1/2/3/4/0)"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "(0) Show more information"
|
||||
Write-Host ""
|
||||
Write-Host ""
|
||||
|
||||
$Mode = Read-Host $ModeSelectionMessage
|
||||
|
||||
if ($Mode -eq '0') {
|
||||
# Print information screen from file
|
||||
PrintFromFile "$PSScriptRoot/Assets/Menus/Info" "Information"
|
||||
|
||||
Write-Host "Press any key to go back..."
|
||||
$null = [System.Console]::ReadKey()
|
||||
}
|
||||
elseif (($Mode -eq '4') -and -not (Test-Path "$PSScriptRoot/SavedSettings")) {
|
||||
$Mode = $null
|
||||
}
|
||||
}
|
||||
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3' -and $Mode -ne '4')
|
||||
|
||||
return $Mode
|
||||
}
|
||||
|
||||
|
||||
function ShowDefaultMode {
|
||||
AddParameter 'CreateRestorePoint' 'Create a system restore point' $false
|
||||
|
||||
# Show options for removing apps, or set selection if RunDefaults or RunDefaultsLite parameter was passed
|
||||
if ($RunDefaults) {
|
||||
$RemoveAppsInput = '1'
|
||||
}
|
||||
elseif ($RunDefaultsLite) {
|
||||
$RemoveAppsInput = '0'
|
||||
}
|
||||
else {
|
||||
$RemoveAppsInput = ShowDefaultModeAppRemovalOptions
|
||||
|
||||
if ($script:selectedApps.contains('Microsoft.XboxGameOverlay') -or $script:selectedApps.contains('Microsoft.XboxGamingOverlay')) {
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt "Disable Game Bar integration and game/screen recording? This also stops ms-gamingoverlay and ms-gamebar popups (y/n)" ) -eq 'y') {
|
||||
$DisableGameBarIntegrationInput = $true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
Write-Output "Win11Debloat will make the following changes:"
|
||||
|
||||
# Select correct option based on user input
|
||||
switch ($RemoveAppsInput) {
|
||||
'1' {
|
||||
AddParameter 'RemoveApps' 'Remove the default selection of apps:' $false
|
||||
PrintAppsList "$PSScriptRoot/Appslist.txt"
|
||||
}
|
||||
'2' {
|
||||
AddParameter 'RemoveAppsCustom' "Remove $($script:SelectedApps.Count) apps:" $false
|
||||
PrintAppsList "$PSScriptRoot/CustomAppsList"
|
||||
}
|
||||
}
|
||||
|
||||
if ($DisableGameBarIntegrationInput) {
|
||||
AddParameter 'DisableDVR' 'Disable Xbox game/screen recording' $false
|
||||
AddParameter 'DisableGameBarIntegration' 'Disable Game Bar integration' $false
|
||||
}
|
||||
|
||||
# Only add this option for Windows 10 users
|
||||
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") {
|
||||
AddParameter 'Hide3dObjects' "Hide the 3D objects folder under 'This pc' in File Explorer" $false
|
||||
AddParameter 'HideChat' 'Hide the chat (meet now) icon from the taskbar' $false
|
||||
}
|
||||
|
||||
# Only add these options for Windows 11 users (build 22000+)
|
||||
if ($WinVersion -ge 22000) {
|
||||
if ($script:ModernStandbySupported) {
|
||||
AddParameter 'DisableModernStandbyNetworking' 'Disable network connectivity during Modern Standby' $false
|
||||
}
|
||||
|
||||
AddParameter 'DisableRecall' 'Disable Windows Recall' $false
|
||||
AddParameter 'DisableClickToDo' 'Disable Click to Do (AI text & image analysis)' $false
|
||||
}
|
||||
|
||||
PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode" $false
|
||||
|
||||
# Suppress prompt if Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
}
|
||||
|
||||
$DefaultParameterNames = 'DisableCopilot','DisableTelemetry','DisableSuggestions','DisableEdgeAds','DisableLockscreenTips','DisableBing','ShowKnownFileExt','DisableWidgets','DisableFastStartup'
|
||||
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
# Add default parameters, if they don't already exist
|
||||
foreach ($ParameterName in $DefaultParameterNames) {
|
||||
if (-not $script:Params.ContainsKey($ParameterName)) {
|
||||
$script:Params.Add($ParameterName, $true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ShowDefaultModeAppRemovalOptions {
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
Write-Host "Please note: The default selection of apps includes Microsoft Teams, Spotify, Sticky Notes and more. Select option 2 to verify and change what apps are removed by the script." -ForegroundColor DarkGray
|
||||
Write-Host ""
|
||||
|
||||
Do {
|
||||
Write-Host "Options:" -ForegroundColor Yellow
|
||||
Write-Host " (n) Don't remove any apps" -ForegroundColor Yellow
|
||||
Write-Host " (1) Only remove the default selection of apps" -ForegroundColor Yellow
|
||||
Write-Host " (2) Manually select which apps to remove" -ForegroundColor Yellow
|
||||
$RemoveAppsInput = Read-Host "Do you want to remove any apps? Apps will be removed for all users (n/1/2)"
|
||||
|
||||
# Show app selection form if user entered option 3
|
||||
if ($RemoveAppsInput -eq '2') {
|
||||
$result = ShowAppSelectionForm
|
||||
|
||||
if ($result -ne [System.Windows.Forms.DialogResult]::OK) {
|
||||
# User cancelled or closed app selection, show error and change RemoveAppsInput so the menu will be shown again
|
||||
Write-Host ""
|
||||
Write-Host "Cancelled application selection, please try again" -ForegroundColor Red
|
||||
|
||||
$RemoveAppsInput = 'c'
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
}
|
||||
}
|
||||
while ($RemoveAppsInput -ne 'n' -and $RemoveAppsInput -ne '0' -and $RemoveAppsInput -ne '1' -and $RemoveAppsInput -ne '2')
|
||||
|
||||
return $RemoveAppsInput
|
||||
}
|
||||
|
||||
|
||||
function ShowCustomModeOptions {
|
||||
# Get current Windows build version to compare against features
|
||||
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
|
||||
|
||||
@@ -946,7 +1103,7 @@ function DisplayCustomModeOptions {
|
||||
Write-Host "Options:" -ForegroundColor Yellow
|
||||
Write-Host " (n) Don't remove any apps" -ForegroundColor Yellow
|
||||
Write-Host " (1) Only remove the default selection of apps" -ForegroundColor Yellow
|
||||
Write-Host " (2) Remove the default selection of apps, as well as mail & calendar apps, developer apps and gaming apps" -ForegroundColor Yellow
|
||||
Write-Host " (2) Remove the default selection of apps, as well as mail & calendar apps and gaming related apps" -ForegroundColor Yellow
|
||||
Write-Host " (3) Manually select which apps to remove" -ForegroundColor Yellow
|
||||
$RemoveAppsInput = Read-Host "Do you want to remove any apps? Apps will be removed for all users (n/1/2/3)"
|
||||
|
||||
@@ -976,9 +1133,9 @@ function DisplayCustomModeOptions {
|
||||
AddParameter 'RemoveApps' 'Remove the default selection of apps'
|
||||
AddParameter 'RemoveCommApps' 'Remove the Mail, Calendar, and People apps'
|
||||
AddParameter 'RemoveW11Outlook' 'Remove the new Outlook for Windows app'
|
||||
AddParameter 'RemoveDevApps' 'Remove developer-related apps'
|
||||
AddParameter 'RemoveGamingApps' 'Remove the Xbox App and Xbox Gamebar'
|
||||
AddParameter 'DisableDVR' 'Disable Xbox game/screen recording'
|
||||
AddParameter 'DisableGameBarIntegration' 'Disable Game Bar integration'
|
||||
}
|
||||
'3' {
|
||||
Write-Output "You have selected $($script:SelectedApps.Count) apps for removal"
|
||||
@@ -987,8 +1144,9 @@ function DisplayCustomModeOptions {
|
||||
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt "Disable Xbox game/screen recording? This also stops gaming overlay popups (y/n)" ) -eq 'y') {
|
||||
if ($( Read-Host -Prompt "Disable Game Bar integration and game/screen recording? This also stops ms-gamingoverlay and ms-gamebar popups (y/n)" ) -eq 'y') {
|
||||
AddParameter 'DisableDVR' 'Disable Xbox game/screen recording'
|
||||
AddParameter 'DisableGameBarIntegration' 'Disable Game Bar integration'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1162,10 +1320,13 @@ function DisplayCustomModeOptions {
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
# Don't show option for users running build 26200 and above, as this setting was removed in this build
|
||||
if ($WinVersion -lt 26200) {
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt " Disable the recommended section in the start menu? This applies to all users (y/n)" ) -eq 'y') {
|
||||
AddParameter 'DisableStartRecommended' 'Disable the recommended section in the start menu.'
|
||||
if ($( Read-Host -Prompt " Disable the recommended section in the start menu? This applies to all users (y/n)" ) -eq 'y') {
|
||||
AddParameter 'DisableStartRecommended' 'Disable the recommended section in the start menu.'
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
@@ -1202,13 +1363,41 @@ function DisplayCustomModeOptions {
|
||||
# Select correct taskbar goup option based on user input
|
||||
switch ($TbCombineTaskbar) {
|
||||
'1' {
|
||||
AddParameter 'CombineTaskbarAlways' 'Always combine taskbar buttons and hide labels'
|
||||
AddParameter 'CombineTaskbarAlways' 'Always combine taskbar buttons and hide labels for the main display'
|
||||
AddParameter 'CombineMMTaskbarAlways' 'Always combine taskbar buttons and hide labels for secondary displays'
|
||||
}
|
||||
'2' {
|
||||
AddParameter 'CombineTaskbarWhenFull' 'Combine taskbar buttons and hide labels when taskbar is full'
|
||||
AddParameter 'CombineTaskbarWhenFull' 'Combine taskbar buttons and hide labels when taskbar is full for the main display'
|
||||
AddParameter 'CombineMMTaskbarWhenFull' 'Combine taskbar buttons and hide labels when taskbar is full for secondary displays'
|
||||
}
|
||||
'3' {
|
||||
AddParameter 'CombineTaskbarNever' 'Never combine taskbar buttons and show labels'
|
||||
AddParameter 'CombineTaskbarNever' 'Never combine taskbar buttons and show labels for the main display'
|
||||
AddParameter 'CombineMMTaskbarNever' 'Never combine taskbar buttons and show labels for secondary displays'
|
||||
}
|
||||
}
|
||||
|
||||
# Show options for changing on what taskbar(s) app icons are shown, only continue on valid input
|
||||
Do {
|
||||
Write-Output ""
|
||||
Write-Host " Options:" -ForegroundColor Yellow
|
||||
Write-Host " (n) No change" -ForegroundColor Yellow
|
||||
Write-Host " (1) Show app icons on all taskbars" -ForegroundColor Yellow
|
||||
Write-Host " (2) Show app icons on main taskbar and on taskbar where the windows is open" -ForegroundColor Yellow
|
||||
Write-Host " (3) Show app icons only on taskbar where the window is open" -ForegroundColor Yellow
|
||||
$TbCombineTaskbar = Read-Host " Change how to show app icons on the taskbar when using multiple monitors? (n/1/2/3)"
|
||||
}
|
||||
while ($TbCombineTaskbar -ne 'n' -and $TbCombineTaskbar -ne '0' -and $TbCombineTaskbar -ne '1' -and $TbCombineTaskbar -ne '2' -and $TbCombineTaskbar -ne '3')
|
||||
|
||||
# Select correct taskbar goup option based on user input
|
||||
switch ($TbCombineTaskbar) {
|
||||
'1' {
|
||||
AddParameter 'MMTaskbarModeAll' 'Show app icons on all taskbars'
|
||||
}
|
||||
'2' {
|
||||
AddParameter 'MMTaskbarModeMainActive' 'Show app icons on main taskbar and on taskbar where the windows is open'
|
||||
}
|
||||
'3' {
|
||||
AddParameter 'MMTaskbarModeActive' 'Show app icons only on taskbar where the window is open'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1382,6 +1571,75 @@ function DisplayCustomModeOptions {
|
||||
}
|
||||
|
||||
|
||||
function ShowAppRemoval {
|
||||
PrintHeader "App Removal"
|
||||
|
||||
$result = ShowAppSelectionForm
|
||||
|
||||
if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
||||
Write-Output "You have selected $($script:SelectedApps.Count) apps for removal"
|
||||
AddParameter 'RemoveAppsCustom' "Remove $($script:SelectedApps.Count) apps:"
|
||||
|
||||
# Suppress prompt if Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
Write-Output "Press enter to remove the selected apps or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
PrintHeader "App Removal"
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Selection was cancelled, no apps have been removed" -ForegroundColor Red
|
||||
Write-Output ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function LoadAndShowSavedSettings {
|
||||
PrintHeader 'Custom Mode'
|
||||
Write-Output "Win11Debloat will make the following changes:"
|
||||
|
||||
# Print the saved settings info from file
|
||||
Foreach ($line in (Get-Content -Path "$PSScriptRoot/SavedSettings" )) {
|
||||
# Remove any spaces before and after the line
|
||||
$line = $line.Trim()
|
||||
|
||||
# Check if the line contains a comment
|
||||
if (-not ($line.IndexOf('#') -eq -1)) {
|
||||
$parameterName = $line.Substring(0, $line.IndexOf('#'))
|
||||
|
||||
# Print parameter description and add parameter to Params list
|
||||
switch ($parameterName) {
|
||||
'RemoveApps' {
|
||||
PrintAppsList "$PSScriptRoot/Appslist.txt" $true
|
||||
}
|
||||
'RemoveAppsCustom' {
|
||||
PrintAppsList "$PSScriptRoot/CustomAppsList" $true
|
||||
}
|
||||
default {
|
||||
Write-Output $line.Substring(($line.IndexOf('#') + 1), ($line.Length - $line.IndexOf('#') - 1))
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $script:Params.ContainsKey($parameterName)) {
|
||||
$script:Params.Add($parameterName, $true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Suppress prompt if Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
}
|
||||
|
||||
PrintHeader 'Custom Mode'
|
||||
}
|
||||
|
||||
|
||||
|
||||
##################################################################################################################
|
||||
# #
|
||||
@@ -1492,206 +1750,29 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunDefaultsLite -or $RunSa
|
||||
$Mode = '4'
|
||||
}
|
||||
else {
|
||||
# Show menu and wait for user input, loops until valid input is provided
|
||||
Do {
|
||||
$ModeSelectionMessage = "Please select an option (1/2/3/0)"
|
||||
|
||||
PrintHeader 'Menu'
|
||||
|
||||
Write-Output "(1) Default mode: Quickly apply the recommended changes"
|
||||
Write-Output "(2) Custom mode: Manually select what changes to make"
|
||||
Write-Output "(3) App removal mode: Select & remove apps, without making other changes"
|
||||
|
||||
# Only show this option if SavedSettings file exists
|
||||
if (Test-Path "$PSScriptRoot/SavedSettings") {
|
||||
Write-Output "(4) Apply saved custom settings from last time"
|
||||
|
||||
$ModeSelectionMessage = "Please select an option (1/2/3/4/0)"
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "(0) Show more information"
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
|
||||
$Mode = Read-Host $ModeSelectionMessage
|
||||
|
||||
if ($Mode -eq '0') {
|
||||
# Print information screen from file
|
||||
PrintFromFile "$PSScriptRoot/Assets/Menus/Info" "Information"
|
||||
|
||||
Write-Output "Press any key to go back..."
|
||||
$null = [System.Console]::ReadKey()
|
||||
}
|
||||
elseif (($Mode -eq '4') -and -not (Test-Path "$PSScriptRoot/SavedSettings")) {
|
||||
$Mode = $null
|
||||
}
|
||||
}
|
||||
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3' -and $Mode -ne '4')
|
||||
$Mode = ShowScriptMenuOptions
|
||||
}
|
||||
|
||||
# Add execution parameters based on the mode
|
||||
switch ($Mode) {
|
||||
# Default mode, loads defaults after confirmation
|
||||
# Default mode, loads defaults and app removal options
|
||||
'1' {
|
||||
AddParameter 'CreateRestorePoint' 'Create a system restore point' $false
|
||||
|
||||
# Show the default settings with confirmation, unless Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
# Show options for app removal
|
||||
if ((-not $RunDefaults) -and (-not $RunDefaultsLite)) {
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
Do {
|
||||
Write-Host "Options:" -ForegroundColor Yellow
|
||||
Write-Host " (n) Don't remove any apps" -ForegroundColor Yellow
|
||||
Write-Host " (1) Only remove the default selection of apps" -ForegroundColor Yellow
|
||||
Write-Host " (2) Manually select which apps to remove" -ForegroundColor Yellow
|
||||
$RemoveAppsInput = Read-Host "Do you want to remove any apps? Apps will be removed for all users (n/1/2)"
|
||||
|
||||
# Show app selection form if user entered option 3
|
||||
if ($RemoveAppsInput -eq '2') {
|
||||
$result = ShowAppSelectionForm
|
||||
|
||||
if ($result -ne [System.Windows.Forms.DialogResult]::OK) {
|
||||
# User cancelled or closed app selection, show error and change RemoveAppsInput so the menu will be shown again
|
||||
Write-Output ""
|
||||
Write-Host "Cancelled application selection, please try again" -ForegroundColor Red
|
||||
|
||||
$RemoveAppsInput = 'c'
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
}
|
||||
}
|
||||
while ($RemoveAppsInput -ne 'n' -and $RemoveAppsInput -ne '0' -and $RemoveAppsInput -ne '1' -and $RemoveAppsInput -ne '2')
|
||||
} elseif ($RunDefaultsLite) {
|
||||
$RemoveAppsInput = '0'
|
||||
} else {
|
||||
$RemoveAppsInput = '1'
|
||||
}
|
||||
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
Write-Output "Win11Debloat will make the following changes:"
|
||||
|
||||
# Select correct option based on user input
|
||||
switch ($RemoveAppsInput) {
|
||||
'1' {
|
||||
AddParameter 'RemoveApps' 'Remove the default selection of apps:' $false
|
||||
PrintAppsList "$PSScriptRoot/Appslist.txt"
|
||||
}
|
||||
'2' {
|
||||
AddParameter 'RemoveAppsCustom' "Remove $($script:SelectedApps.Count) apps:" $false
|
||||
PrintAppsList "$PSScriptRoot/CustomAppsList"
|
||||
}
|
||||
}
|
||||
|
||||
# Only add this option for Windows 10 users
|
||||
if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") {
|
||||
AddParameter 'Hide3dObjects' "Hide the 3D objects folder under 'This pc' in File Explorer" $false
|
||||
AddParameter 'HideChat' 'Hide the chat (meet now) icon from the taskbar' $false
|
||||
}
|
||||
|
||||
# Only add these options for Windows 11 users (build 22000+)
|
||||
if ($WinVersion -ge 22000) {
|
||||
if ($script:ModernStandbySupported) {
|
||||
AddParameter 'DisableModernStandbyNetworking' 'Disable network connectivity during Modern Standby' $false
|
||||
}
|
||||
|
||||
AddParameter 'DisableRecall' 'Disable Windows Recall' $false
|
||||
AddParameter 'DisableClickToDo' 'Disable Click to Do (AI text & image analysis)' $false
|
||||
}
|
||||
|
||||
PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode" $false
|
||||
|
||||
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
}
|
||||
|
||||
$DefaultParameterNames = 'DisableCopilot','DisableTelemetry','DisableSuggestions','DisableEdgeAds','DisableLockscreenTips','DisableBing','ShowKnownFileExt','DisableWidgets','DisableFastStartup'
|
||||
|
||||
PrintHeader 'Default Mode'
|
||||
|
||||
# Add default parameters, if they don't already exist
|
||||
foreach ($ParameterName in $DefaultParameterNames) {
|
||||
if (-not $script:Params.ContainsKey($ParameterName)) {
|
||||
$script:Params.Add($ParameterName, $true)
|
||||
}
|
||||
}
|
||||
ShowDefaultMode
|
||||
}
|
||||
|
||||
# Custom mode, show & add options based on user input
|
||||
# Custom mode, shows all available options for user selection
|
||||
'2' {
|
||||
DisplayCustomModeOptions
|
||||
ShowCustomModeOptions
|
||||
}
|
||||
|
||||
# App removal, remove apps based on user selection
|
||||
'3' {
|
||||
PrintHeader "App Removal"
|
||||
|
||||
$result = ShowAppSelectionForm
|
||||
|
||||
if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
||||
Write-Output "You have selected $($script:SelectedApps.Count) apps for removal"
|
||||
AddParameter 'RemoveAppsCustom' "Remove $($script:SelectedApps.Count) apps:"
|
||||
|
||||
# Suppress prompt if Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
Write-Output "Press enter to remove the selected apps or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
PrintHeader "App Removal"
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Selection was cancelled, no apps have been removed" -ForegroundColor Red
|
||||
Write-Output ""
|
||||
}
|
||||
ShowAppRemoval
|
||||
}
|
||||
|
||||
# Load custom options from the "SavedSettings" file
|
||||
# Load last used custom options from the "SavedSettings" file
|
||||
'4' {
|
||||
PrintHeader 'Custom Mode'
|
||||
Write-Output "Win11Debloat will make the following changes:"
|
||||
|
||||
# Print the saved settings info from file
|
||||
Foreach ($line in (Get-Content -Path "$PSScriptRoot/SavedSettings" )) {
|
||||
# Remove any spaces before and after the line
|
||||
$line = $line.Trim()
|
||||
|
||||
# Check if the line contains a comment
|
||||
if (-not ($line.IndexOf('#') -eq -1)) {
|
||||
$parameterName = $line.Substring(0, $line.IndexOf('#'))
|
||||
|
||||
# Print parameter description and add parameter to Params list
|
||||
switch ($parameterName) {
|
||||
'RemoveApps' {
|
||||
PrintAppsList "$PSScriptRoot/Appslist.txt" $true
|
||||
}
|
||||
'RemoveAppsCustom' {
|
||||
PrintAppsList "$PSScriptRoot/CustomAppsList" $true
|
||||
}
|
||||
default {
|
||||
Write-Output $line.Substring(($line.IndexOf('#') + 1), ($line.Length - $line.IndexOf('#') - 1))
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $script:Params.ContainsKey($parameterName)) {
|
||||
$script:Params.Add($parameterName, $true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $Silent) {
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
|
||||
Read-Host | Out-Null
|
||||
}
|
||||
|
||||
PrintHeader 'Custom Mode'
|
||||
LoadAndShowSavedSettings
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1701,18 +1782,19 @@ else {
|
||||
|
||||
# If the number of keys in SPParams equals the number of keys in Params then no modifications/changes were selected
|
||||
# or added by the user, and the script can exit without making any changes.
|
||||
if ($SPParamCount -eq $script:Params.Keys.Count) {
|
||||
if (($SPParamCount -eq $script:Params.Keys.Count) -or (($script:Params.Keys.Count -eq 1) -and ($script:Params.Keys -contains 'CreateRestorePoint'))) {
|
||||
Write-Output "The script completed without making any changes."
|
||||
|
||||
AwaitKeyToExit
|
||||
}
|
||||
|
||||
# Create a system restore point if the CreateRestorePoint parameter was passed
|
||||
if ($script:Params.ContainsKey("CreateRestorePoint")) {
|
||||
CreateSystemRestorePoint
|
||||
}
|
||||
|
||||
# Execute all selected/provided parameters
|
||||
switch ($script:Params.Keys) {
|
||||
'CreateRestorePoint' {
|
||||
CreateSystemRestorePoint
|
||||
continue
|
||||
}
|
||||
'RemoveApps' {
|
||||
$appsList = ReadAppslistFromFile "$PSScriptRoot/Appslist.txt"
|
||||
Write-Output "> Removing default selection of $($appsList.Count) apps..."
|
||||
@@ -1743,12 +1825,6 @@ switch ($script:Params.Keys) {
|
||||
RemoveApps $appsList
|
||||
continue
|
||||
}
|
||||
'RemoveDevApps' {
|
||||
$appsList = 'Microsoft.PowerAutomateDesktop', 'Microsoft.RemoteDesktop', 'Windows.DevHome'
|
||||
Write-Output "> Removing developer-related related apps..."
|
||||
RemoveApps $appsList
|
||||
continue
|
||||
}
|
||||
'RemoveGamingApps' {
|
||||
$appsList = 'Microsoft.GamingApp', 'Microsoft.XboxGameOverlay', 'Microsoft.XboxGamingOverlay'
|
||||
Write-Output "> Removing gaming related apps..."
|
||||
@@ -1769,6 +1845,10 @@ switch ($script:Params.Keys) {
|
||||
RegImport "> Disabling Xbox game/screen recording..." "Disable_DVR.reg"
|
||||
continue
|
||||
}
|
||||
'DisableGameBarIntegration' {
|
||||
RegImport "> Disabling Game Bar integration..." "Disable_Game_Bar_Integration.reg"
|
||||
continue
|
||||
}
|
||||
'DisableTelemetry' {
|
||||
RegImport "> Disabling telemetry, diagnostic data, activity history, app-launch tracking and targeted ads..." "Disable_Telemetry.reg"
|
||||
continue
|
||||
@@ -1898,15 +1978,39 @@ switch ($script:Params.Keys) {
|
||||
continue
|
||||
}
|
||||
'CombineTaskbarAlways' {
|
||||
RegImport "> Setting the taskbar to always combine buttons and hide labels..." "Combine_Taskbar_Never.reg"
|
||||
RegImport "> Setting the taskbar on the main display to always combine buttons and hide labels..." "Combine_Taskbar_Always.reg"
|
||||
continue
|
||||
}
|
||||
'CombineTaskbarWhenFull' {
|
||||
RegImport "> Setting the taskbar to only combine buttons and hide labels when the taskbar is full..." "Combine_Taskbar_When_Full.reg"
|
||||
RegImport "> Setting the taskbar on the main display to only combine buttons and hide labels when the taskbar is full..." "Combine_Taskbar_When_Full.reg"
|
||||
continue
|
||||
}
|
||||
'CombineTaskbarNever' {
|
||||
RegImport "> Setting the taskbar to never combine buttons or hide labels..." "Combine_Taskbar_Never.reg"
|
||||
RegImport "> Setting the taskbar on the main display to never combine buttons or hide labels..." "Combine_Taskbar_Never.reg"
|
||||
continue
|
||||
}
|
||||
'CombineMMTaskbarAlways' {
|
||||
RegImport "> Setting the taskbar on secondary displays to always combine buttons and hide labels..." "Combine_MMTaskbar_Always.reg"
|
||||
continue
|
||||
}
|
||||
'CombineMMTaskbarWhenFull' {
|
||||
RegImport "> Setting the taskbar on secondary displays to only combine buttons and hide labels when the taskbar is full..." "Combine_MMTaskbar_When_Full.reg"
|
||||
continue
|
||||
}
|
||||
'CombineMMTaskbarNever' {
|
||||
RegImport "> Setting the taskbar on secondary displays to never combine buttons or hide labels..." "Combine_MMTaskbar_Never.reg"
|
||||
continue
|
||||
}
|
||||
'MMTaskbarModeAll' {
|
||||
RegImport "> Setting the taskbar to only show app icons on main taskbar..." "MMTaskbarMode_All.reg"
|
||||
continue
|
||||
}
|
||||
'MMTaskbarModeMainActive' {
|
||||
RegImport "> Setting the taskbar to show app icons on all taskbars..." "MMTaskbarMode_Main_Active.reg"
|
||||
continue
|
||||
}
|
||||
'MMTaskbarModeActive' {
|
||||
RegImport "> Setting the taskbar to only show app icons on the taskbar where the window is open..." "MMTaskbarMode_Active.reg"
|
||||
continue
|
||||
}
|
||||
'HideSearchTb' {
|
||||
|
||||
Reference in New Issue
Block a user