mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Compare commits
9 Commits
2025.08.01
...
properly-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9de9b353d | ||
|
|
b27971933e | ||
|
|
b100cf15f2 | ||
|
|
b6dc5c0147 | ||
|
|
a68c0a53fb | ||
|
|
31b13bf861 | ||
|
|
62e95376a6 | ||
|
|
c881858f32 | ||
|
|
cc3fc90592 |
@@ -2,10 +2,12 @@ Win11Debloat will make the following changes:
|
|||||||
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
|
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
|
||||||
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
|
||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
|
||||||
|
- Disable ads and the MSN news feed in Microsoft Edge.
|
||||||
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
|
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
|
||||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||||
- Disable & remove Microsoft Copilot. (W11 only)
|
- Disable & remove Microsoft Copilot. (W11 only)
|
||||||
- Disable Fast Start-up to ensure a full shutdown.
|
- Disable Fast Start-up to ensure a full shutdown.
|
||||||
|
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||||
- Show file extensions for known file types.
|
- Show file extensions for known file types.
|
||||||
- Hide the 3D objects folder in Windows Explorer. (W10 only)
|
- Hide the 3D objects folder in Windows Explorer. (W10 only)
|
||||||
- Disable the widget service & hide the icon from the taskbar.
|
- Disable the widget service & hide the icon from the taskbar.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ App Removal
|
|||||||
Telemetry, Tracking & Suggested Content
|
Telemetry, Tracking & Suggested Content
|
||||||
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
||||||
- Disable tips, tricks, suggestions & ads across Windows.
|
- Disable tips, tricks, suggestions & ads across Windows.
|
||||||
|
- Disable ads and the MSN news feed in Microsoft Edge.
|
||||||
- Disable the 'Windows Spotlight' desktop background option.
|
- Disable the 'Windows Spotlight' desktop background option.
|
||||||
|
|
||||||
Bing Web Search, Copilot & AI Features
|
Bing Web Search, Copilot & AI Features
|
||||||
@@ -53,6 +54,7 @@ Start
|
|||||||
Other
|
Other
|
||||||
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
||||||
- Disable Fast Start-up to ensure a full shutdown.
|
- Disable Fast Start-up to ensure a full shutdown.
|
||||||
|
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||||
- Option to apply changes to a different user, instead of the currently logged in user.
|
- 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.
|
- Sysprep mode to apply changes to the Windows Default user profile.
|
||||||
|
|
||||||
@@ -63,6 +65,7 @@ The default mode applies the changes that are recommended for most users. This i
|
|||||||
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
|
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
|
||||||
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
|
||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
|
||||||
|
- Disable ads and the MSN news feed in Microsoft Edge.
|
||||||
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
|
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
|
||||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||||
- Disable & remove Microsoft Copilot. (W11 only)
|
- Disable & remove Microsoft Copilot. (W11 only)
|
||||||
|
|||||||
5
Get.ps1
5
Get.ps1
@@ -19,10 +19,12 @@ param (
|
|||||||
[switch]$DisableDVR,
|
[switch]$DisableDVR,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableFastStartup,
|
[switch]$DisableFastStartup,
|
||||||
|
[switch]$DisableModernStandbyNetworking,
|
||||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||||
[switch]$DisableWindowsSuggestions, [switch]$DisableSuggestions,
|
[switch]$DisableWindowsSuggestions, [switch]$DisableSuggestions,
|
||||||
|
[switch]$DisableEdgeAds,
|
||||||
[switch]$DisableSettings365Ads,
|
[switch]$DisableSettings365Ads,
|
||||||
[switch]$DisableSettingsHome,
|
[switch]$DisableSettingsHome,
|
||||||
[switch]$ShowHiddenFolders,
|
[switch]$ShowHiddenFolders,
|
||||||
@@ -40,6 +42,7 @@ param (
|
|||||||
[switch]$DisableRecall,
|
[switch]$DisableRecall,
|
||||||
[switch]$DisablePaintAI,
|
[switch]$DisablePaintAI,
|
||||||
[switch]$DisableNotepadAI,
|
[switch]$DisableNotepadAI,
|
||||||
|
[switch]$DisableEdgeAI,
|
||||||
[switch]$DisableWidgets, [switch]$HideWidgets,
|
[switch]$DisableWidgets, [switch]$HideWidgets,
|
||||||
[switch]$DisableChat, [switch]$HideChat,
|
[switch]$DisableChat, [switch]$HideChat,
|
||||||
[switch]$EnableEndTask,
|
[switch]$EnableEndTask,
|
||||||
@@ -82,7 +85,7 @@ Write-Output "------------------------------------------------------------------
|
|||||||
Write-Output "> Downloading Win11Debloat..."
|
Write-Output "> Downloading Win11Debloat..."
|
||||||
|
|
||||||
# Download latest version of Win11Debloat from github as zip archive
|
# Download latest version of Win11Debloat from github as zip archive
|
||||||
Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.08.01 -OutFile "$env:TEMP/win11debloat.zip"
|
Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.08.16 -OutFile "$env:TEMP/win11debloat.zip"
|
||||||
|
|
||||||
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
|
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
|
||||||
if (Test-Path "$env:TEMP/Win11Debloat") {
|
if (Test-Path "$env:TEMP/Win11Debloat") {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ Download & run the script automatically via PowerShell.
|
|||||||
3. Wait for the script to automatically download Win11Debloat.
|
3. Wait for the script to automatically download Win11Debloat.
|
||||||
4. Carefully read through and follow the on-screen instructions.
|
4. Carefully read through and follow the on-screen instructions.
|
||||||
|
|
||||||
This method supports parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
|
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
|
||||||
|
|
||||||
### Traditional method
|
### Traditional method
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ This method supports parameters to customize the behaviour of the script. Please
|
|||||||
|
|
||||||
6. Carefully read through and follow the on-screen instructions.
|
6. Carefully read through and follow the on-screen instructions.
|
||||||
|
|
||||||
This method supports parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
|
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
@@ -102,6 +102,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
|
|
||||||
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, File Explorer, and on the lockscreen.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications, File Explorer, and on the lockscreen.
|
||||||
|
- Disable ads and the MSN news feed in Microsoft Edge.
|
||||||
- Disable the 'Windows Spotlight' desktop background option.
|
- Disable the 'Windows Spotlight' desktop background option.
|
||||||
|
|
||||||
#### Bing Web Search, Copilot & AI Features
|
#### Bing Web Search, Copilot & AI Features
|
||||||
@@ -109,6 +110,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||||
- Disable & remove Microsoft Copilot. (W11 only)
|
- Disable & remove Microsoft Copilot. (W11 only)
|
||||||
- Disable Windows Recall snapshots. (W11 only)
|
- Disable Windows Recall snapshots. (W11 only)
|
||||||
|
- Disable AI Features in Edge (W11 only)
|
||||||
- Disable AI Features in Paint (W11 only)
|
- Disable AI Features in Paint (W11 only)
|
||||||
- Disable AI Features in Notepad (W11 only)
|
- Disable AI Features in Notepad (W11 only)
|
||||||
|
|
||||||
@@ -149,6 +151,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
|
|
||||||
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
||||||
- Disable Fast Start-up to ensure a full shutdown.
|
- Disable Fast Start-up to ensure a full shutdown.
|
||||||
|
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||||
- 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.
|
- 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. Afterwards, all new users will have the changes automatically applied to them.
|
||||||
|
|
||||||
@@ -164,9 +167,11 @@ Win11Debloat offers a default mode that allows you to quickly and easily apply t
|
|||||||
- Remove the default selection of bloatware apps. (See below for full list)
|
- Remove the default selection of bloatware apps. (See below for full list)
|
||||||
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
||||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, File Explorer, and on the lockscreen.
|
- Disable tips, tricks, suggestions and ads in start, settings, notifications, File Explorer, and on the lockscreen.
|
||||||
|
- Disable ads and the MSN news feed in Microsoft Edge.
|
||||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||||
- Disable & remove Microsoft Copilot. (W11 only)
|
- Disable & remove Microsoft Copilot. (W11 only)
|
||||||
- Disable Fast Start-up to ensure a full shutdown.
|
- Disable Fast Start-up to ensure a full shutdown.
|
||||||
|
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||||
- Show file extensions for known file types.
|
- Show file extensions for known file types.
|
||||||
- Hide the 3D objects folder under 'This pc' from File Explorer. (W10 only)
|
- Hide the 3D objects folder under 'This pc' from File Explorer. (W10 only)
|
||||||
- Disable the widget service & hide the icon from the taskbar.
|
- Disable the widget service & hide the icon from the taskbar.
|
||||||
|
|||||||
11
Regfiles/Disable_Edge_AI_Features.reg
Normal file
11
Regfiles/Disable_Edge_AI_Features.reg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
|
||||||
|
"CopilotCDPPageContext"=dword:00000000
|
||||||
|
"CopilotPageContext"=dword:00000000
|
||||||
|
"HubsSidebarEnabled"=dword:00000000
|
||||||
|
"EdgeEntraCopilotPageContext"=dword:00000000
|
||||||
|
"EdgeHistoryAISearchEnabled"=dword:00000000
|
||||||
|
"ComposeInlineEnabled"=dword:00000000
|
||||||
|
"GenAILocalFoundationalModelSettings"=dword:00000001
|
||||||
|
"NewTabPageBingChatEnabled"=dword:00000000
|
||||||
BIN
Regfiles/Disable_Edge_Ads_And_Suggestions.reg
Normal file
BIN
Regfiles/Disable_Edge_Ads_And_Suggestions.reg
Normal file
Binary file not shown.
5
Regfiles/Disable_Modern_Standby_Networking.reg
Normal file
5
Regfiles/Disable_Modern_Standby_Networking.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9]
|
||||||
|
"ACSettingIndex"=dword:00000000
|
||||||
|
"DCSettingIndex"=dword:00000000
|
||||||
@@ -2,15 +2,7 @@ Windows Registry Editor Version 5.00
|
|||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
||||||
"DisableCocreator"=dword:00000001
|
"DisableCocreator"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableGenerativeFill"=dword:00000001
|
"DisableGenerativeFill"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableImageCreator"=dword:00000001
|
"DisableImageCreator"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableGenerativeErase"=dword:00000001
|
"DisableGenerativeErase"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableRemoveBackground"=dword:00000001
|
"DisableRemoveBackground"=dword:00000001
|
||||||
|
|||||||
Binary file not shown.
11
Regfiles/Sysprep/Disable_Edge_AI_Features.reg
Normal file
11
Regfiles/Sysprep/Disable_Edge_AI_Features.reg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
|
||||||
|
"CopilotCDPPageContext"=dword:00000000
|
||||||
|
"CopilotPageContext"=dword:00000000
|
||||||
|
"HubsSidebarEnabled"=dword:00000000
|
||||||
|
"EdgeEntraCopilotPageContext"=dword:00000000
|
||||||
|
"EdgeHistoryAISearchEnabled"=dword:00000000
|
||||||
|
"ComposeInlineEnabled"=dword:00000000
|
||||||
|
"GenAILocalFoundationalModelSettings"=dword:00000001
|
||||||
|
"NewTabPageBingChatEnabled"=dword:00000000
|
||||||
BIN
Regfiles/Sysprep/Disable_Edge_Ads_And_Suggestions.reg
Normal file
BIN
Regfiles/Sysprep/Disable_Edge_Ads_And_Suggestions.reg
Normal file
Binary file not shown.
5
Regfiles/Sysprep/Disable_Modern_Standby_Networking.reg
Normal file
5
Regfiles/Sysprep/Disable_Modern_Standby_Networking.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9]
|
||||||
|
"ACSettingIndex"=dword:00000000
|
||||||
|
"DCSettingIndex"=dword:00000000
|
||||||
@@ -2,12 +2,7 @@ Windows Registry Editor Version 5.00
|
|||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
||||||
"DisableCocreator"=dword:00000001
|
"DisableCocreator"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableGenerativeFill"=dword:00000001
|
"DisableGenerativeFill"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableImageCreator"=dword:00000001
|
"DisableImageCreator"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Paint]
|
|
||||||
"DisableGenerativeErase"=dword:00000001
|
"DisableGenerativeErase"=dword:00000001
|
||||||
|
"DisableRemoveBackground"=dword:00000001
|
||||||
|
|||||||
Binary file not shown.
11
Regfiles/Undo/Enable_Edge_AI_Features.reg
Normal file
11
Regfiles/Undo/Enable_Edge_AI_Features.reg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
|
||||||
|
"CopilotCDPPageContext"=-
|
||||||
|
"CopilotPageContext"=-
|
||||||
|
"HubsSidebarEnabled"=-
|
||||||
|
"EdgeEntraCopilotPageContext"=-
|
||||||
|
"EdgeHistoryAISearchEnabled"=-
|
||||||
|
"ComposeInlineEnabled"=-
|
||||||
|
"GenAILocalFoundationalModelSettings"=-
|
||||||
|
"NewTabPageBingChatEnabled"=-
|
||||||
BIN
Regfiles/Undo/Enable_Edge_Ads_And_Suggestions.reg
Normal file
BIN
Regfiles/Undo/Enable_Edge_Ads_And_Suggestions.reg
Normal file
Binary file not shown.
5
Regfiles/Undo/Enable_Modern_Standby_Networking.reg
Normal file
5
Regfiles/Undo/Enable_Modern_Standby_Networking.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9]
|
||||||
|
"ACSettingIndex"=dword:00000001
|
||||||
|
"DCSettingIndex"=dword:00000001
|
||||||
@@ -5,3 +5,4 @@ Windows Registry Editor Version 5.00
|
|||||||
"DisableGenerativeFill"=-
|
"DisableGenerativeFill"=-
|
||||||
"DisableImageCreator"=-
|
"DisableImageCreator"=-
|
||||||
"DisableGenerativeErase"=-
|
"DisableGenerativeErase"=-
|
||||||
|
"DisableRemoveBackground"=-
|
||||||
|
|||||||
Binary file not shown.
134
Win11Debloat.ps1
134
Win11Debloat.ps1
@@ -21,10 +21,12 @@ param (
|
|||||||
[switch]$DisableDVR,
|
[switch]$DisableDVR,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableFastStartup,
|
[switch]$DisableFastStartup,
|
||||||
|
[switch]$DisableModernStandbyNetworking,
|
||||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||||
[switch]$DisableWindowsSuggestions, [switch]$DisableSuggestions,
|
[switch]$DisableWindowsSuggestions, [switch]$DisableSuggestions,
|
||||||
|
[switch]$DisableEdgeAds,
|
||||||
[switch]$DisableSettings365Ads,
|
[switch]$DisableSettings365Ads,
|
||||||
[switch]$DisableSettingsHome,
|
[switch]$DisableSettingsHome,
|
||||||
[switch]$ShowHiddenFolders,
|
[switch]$ShowHiddenFolders,
|
||||||
@@ -42,6 +44,7 @@ param (
|
|||||||
[switch]$DisableRecall,
|
[switch]$DisableRecall,
|
||||||
[switch]$DisablePaintAI,
|
[switch]$DisablePaintAI,
|
||||||
[switch]$DisableNotepadAI,
|
[switch]$DisableNotepadAI,
|
||||||
|
[switch]$DisableEdgeAI,
|
||||||
[switch]$DisableWidgets, [switch]$HideWidgets,
|
[switch]$DisableWidgets, [switch]$HideWidgets,
|
||||||
[switch]$DisableChat, [switch]$HideChat,
|
[switch]$DisableChat, [switch]$HideChat,
|
||||||
[switch]$EnableEndTask,
|
[switch]$EnableEndTask,
|
||||||
@@ -539,6 +542,35 @@ function Strip-Progress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Check if this machine supports S0 Modern Standby power state. Returns true if S0 Modern Standby is supported, false otherwise.
|
||||||
|
function CheckModernStandbySupport {
|
||||||
|
$count = 0
|
||||||
|
|
||||||
|
try {
|
||||||
|
switch -Regex (powercfg /a) {
|
||||||
|
':' {
|
||||||
|
$count += 1
|
||||||
|
}
|
||||||
|
|
||||||
|
'(.*S0.{1,}\))' {
|
||||||
|
if ($count -eq 1) {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Error: Unable to check for S0 Modern Standby support, powercfg command failed" -ForegroundColor Red
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "Press any key to continue..."
|
||||||
|
$null = [System.Console]::ReadKey()
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Import & execute regfile
|
# Import & execute regfile
|
||||||
function RegImport {
|
function RegImport {
|
||||||
param (
|
param (
|
||||||
@@ -775,17 +807,31 @@ function GetUserName {
|
|||||||
|
|
||||||
function CreateSystemRestorePoint {
|
function CreateSystemRestorePoint {
|
||||||
Write-Output "> Attempting to create a system restore point..."
|
Write-Output "> Attempting to create a system restore point..."
|
||||||
|
|
||||||
$SysRestore = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "RPSessionInterval"
|
$SysRestore = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "RPSessionInterval"
|
||||||
|
|
||||||
if ($SysRestore.RPSessionInterval -eq 0) {
|
if ($SysRestore.RPSessionInterval -eq 0) {
|
||||||
if ($Silent -or $( Read-Host -Prompt "System restore is disabled, would you like to enable it and create a restore point? (y/n)") -eq 'y') {
|
if ($Silent -or $( Read-Host -Prompt "System restore is disabled, would you like to enable it and create a restore point? (y/n)") -eq 'y') {
|
||||||
try {
|
$enableSystemRestoreJob = Start-Job {
|
||||||
Enable-ComputerRestore -Drive "$env:SystemDrive"
|
try {
|
||||||
} catch {
|
Enable-ComputerRestore -Drive "$env:SystemDrive"
|
||||||
Write-Host "Error: Failed to enable System Restore: $_" -ForegroundColor Red
|
} catch {
|
||||||
|
Write-Host "Error: Failed to enable System Restore: $_" -ForegroundColor Red
|
||||||
|
Write-Output ""
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$enableSystemRestoreJobDone = $enableSystemRestoreJob | Wait-Job -TimeOut 20
|
||||||
|
|
||||||
|
if (-not $enableSystemRestoreJobDone) {
|
||||||
|
Write-Host "Error: Failed to enable system restore and create restore point, operation timed out" -ForegroundColor Red
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
Write-Output "Press any key to continue anyway..."
|
||||||
|
$null = [System.Console]::ReadKey()
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
Receive-Job $enableSystemRestoreJob
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
@@ -793,24 +839,37 @@ function CreateSystemRestorePoint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find existing restore points that are less than 24 hours old
|
$createRestorePointJob = Start-Job {
|
||||||
try {
|
# Find existing restore points that are less than 24 hours old
|
||||||
$recentRestorePoints = Get-ComputerRestorePoint | Where-Object { (Get-Date) - [System.Management.ManagementDateTimeConverter]::ToDateTime($_.CreationTime) -le (New-TimeSpan -Hours 24) }
|
|
||||||
} catch {
|
|
||||||
Write-Host "Error: Unable to retrieve existing restore points: $_" -ForegroundColor Red
|
|
||||||
Write-Output ""
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($recentRestorePoints.Count -eq 0) {
|
|
||||||
try {
|
try {
|
||||||
Checkpoint-Computer -Description "Restore point created by Win11Debloat" -RestorePointType "MODIFY_SETTINGS"
|
$recentRestorePoints = Get-ComputerRestorePoint | Where-Object { (Get-Date) - [System.Management.ManagementDateTimeConverter]::ToDateTime($_.CreationTime) -le (New-TimeSpan -Hours 24) }
|
||||||
Write-Output "System restore point created successfully"
|
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error: Unable to create restore point: $_" -ForegroundColor Red
|
Write-Host "Error: Unable to retrieve existing restore points: $_" -ForegroundColor Red
|
||||||
|
Write-Output ""
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($recentRestorePoints.Count -eq 0) {
|
||||||
|
try {
|
||||||
|
Checkpoint-Computer -Description "Restore point created by Win11Debloat" -RestorePointType "MODIFY_SETTINGS"
|
||||||
|
Write-Output "System restore point created successfully"
|
||||||
|
} catch {
|
||||||
|
Write-Host "Error: Unable to create restore point: $_" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "A recent restore point already exists, no new restore point was created." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$createRestorePointJobDone = $createRestorePointJob | Wait-Job -TimeOut 20
|
||||||
|
|
||||||
|
if (-not $createRestorePointJobDone) {
|
||||||
|
Write-Host "Error: Failed to create system restore point, operation timed out" -ForegroundColor Red
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "Press any key to continue anyway..."
|
||||||
|
$null = [System.Console]::ReadKey()
|
||||||
} else {
|
} else {
|
||||||
Write-Host "A recent restore point already exists, no new restore point was created." -ForegroundColor Yellow
|
Receive-Job $createRestorePointJob
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
@@ -885,8 +944,9 @@ function DisplayCustomModeOptions {
|
|||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer and lockscreen? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer, lockscreen and edge? (y/n)" ) -eq 'y') {
|
||||||
AddParameter 'DisableSuggestions' 'Disable tips, tricks, suggestions and ads in start, settings, notifications and File Explorer'
|
AddParameter 'DisableSuggestions' 'Disable tips, tricks, suggestions and ads in start, settings, notifications and File Explorer'
|
||||||
|
AddParameter 'DisableEdgeAds' 'Disable ads and the MSN news feed in Microsoft Edge'
|
||||||
AddParameter 'DisableSettings365Ads' 'Disable Microsoft 365 ads in Settings Home'
|
AddParameter 'DisableSettings365Ads' 'Disable Microsoft 365 ads in Settings Home'
|
||||||
AddParameter 'DisableLockscreenTips' 'Disable tips & tricks on the lockscreen'
|
AddParameter 'DisableLockscreenTips' 'Disable tips & tricks on the lockscreen'
|
||||||
}
|
}
|
||||||
@@ -906,7 +966,7 @@ function DisplayCustomModeOptions {
|
|||||||
Write-Host "Options:" -ForegroundColor Yellow
|
Write-Host "Options:" -ForegroundColor Yellow
|
||||||
Write-Host " (n) Don't disable any AI features" -ForegroundColor Yellow
|
Write-Host " (n) Don't disable any AI features" -ForegroundColor Yellow
|
||||||
Write-Host " (1) Disable Microsoft Copilot and Windows Recall snapshots" -ForegroundColor Yellow
|
Write-Host " (1) Disable Microsoft Copilot and Windows Recall snapshots" -ForegroundColor Yellow
|
||||||
Write-Host " (2) Disable Microsoft Copilot, Windows Recall snapshots and AI features in Paint and Notepad" -ForegroundColor Yellow
|
Write-Host " (2) Disable Microsoft Copilot, Windows Recall snapshots and AI features in Microsoft Edge, Paint and Notepad" -ForegroundColor Yellow
|
||||||
$DisableAIInput = Read-Host "Do you want to disable any AI features? This applies to all users (n/1/2)"
|
$DisableAIInput = Read-Host "Do you want to disable any AI features? This applies to all users (n/1/2)"
|
||||||
}
|
}
|
||||||
while ($DisableAIInput -ne 'n' -and $DisableAIInput -ne '0' -and $DisableAIInput -ne '1' -and $DisableAIInput -ne '2')
|
while ($DisableAIInput -ne 'n' -and $DisableAIInput -ne '0' -and $DisableAIInput -ne '1' -and $DisableAIInput -ne '2')
|
||||||
@@ -920,6 +980,7 @@ function DisplayCustomModeOptions {
|
|||||||
'2' {
|
'2' {
|
||||||
AddParameter 'DisableCopilot' 'Disable & remove Microsoft Copilot'
|
AddParameter 'DisableCopilot' 'Disable & remove Microsoft Copilot'
|
||||||
AddParameter 'DisableRecall' 'Disable Windows Recall snapshots'
|
AddParameter 'DisableRecall' 'Disable Windows Recall snapshots'
|
||||||
|
AddParameter 'DisableEdgeAI' 'Disable AI features in Edge'
|
||||||
AddParameter 'DisablePaintAI' 'Disable AI features in Paint'
|
AddParameter 'DisablePaintAI' 'Disable AI features in Paint'
|
||||||
AddParameter 'DisableNotepadAI' 'Disable AI features in Notepad'
|
AddParameter 'DisableNotepadAI' 'Disable AI features in Notepad'
|
||||||
}
|
}
|
||||||
@@ -975,6 +1036,15 @@ function DisplayCustomModeOptions {
|
|||||||
AddParameter 'DisableFastStartup' 'Disable Fast Start-up'
|
AddParameter 'DisableFastStartup' 'Disable Fast Start-up'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Only show this option for Windows 11 users running build 22000 or later, and if the machine has at least one battery
|
||||||
|
if (($WinVersion -ge 22000) -and $script:ModernStandbySupported) {
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
if ($( Read-Host -Prompt "Disable network connectivity during Modern Standby? This applies to all users (y/n)" ) -eq 'y') {
|
||||||
|
AddParameter 'DisableModernStandbyNetworking' 'Disable network connectivity during Modern Standby'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Only show option for disabling context menu items for Windows 10 users or if the user opted to restore the Windows 10 context menu
|
# Only show option for disabling context menu items for Windows 10 users or if the user opted to restore the Windows 10 context menu
|
||||||
if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -or $script:Params.ContainsKey('RevertContextMenu')) {
|
if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -or $script:Params.ContainsKey('RevertContextMenu')) {
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
@@ -1256,6 +1326,9 @@ else {
|
|||||||
# Get current Windows build version to compare against features
|
# Get current Windows build version to compare against features
|
||||||
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
|
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
|
||||||
|
|
||||||
|
# Check if the machine supports Modern Standby, this is used to determine if the DisableModernStandbyNetworking option can be used
|
||||||
|
$script:ModernStandbySupported = CheckModernStandbySupport
|
||||||
|
|
||||||
$script:Params = $PSBoundParameters
|
$script:Params = $PSBoundParameters
|
||||||
$script:FirstSelection = $true
|
$script:FirstSelection = $true
|
||||||
$SPParams = 'WhatIf', 'Confirm', 'Verbose', 'Silent', 'Sysprep', 'Debug', 'User', 'CreateRestorePoint', 'LogPath'
|
$SPParams = 'WhatIf', 'Confirm', 'Verbose', 'Silent', 'Sysprep', 'Debug', 'User', 'CreateRestorePoint', 'LogPath'
|
||||||
@@ -1397,7 +1470,7 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
|
|||||||
Read-Host | Out-Null
|
Read-Host | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
$DefaultParameterNames = 'CreateRestorePoint','RemoveApps','DisableTelemetry','DisableBing','DisableLockscreenTips','DisableSuggestions','ShowKnownFileExt','DisableWidgets','HideChat','DisableCopilot','DisableFastStartup'
|
$DefaultParameterNames = 'CreateRestorePoint','RemoveApps','DisableTelemetry','DisableBing','DisableLockscreenTips','DisableSuggestions','DisableEdgeAds','ShowKnownFileExt','DisableWidgets','HideChat','DisableCopilot','DisableFastStartup'
|
||||||
|
|
||||||
PrintHeader 'Default Mode'
|
PrintHeader 'Default Mode'
|
||||||
|
|
||||||
@@ -1412,6 +1485,11 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
|
|||||||
if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -and (-not $script:Params.ContainsKey('Hide3dObjects'))) {
|
if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -and (-not $script:Params.ContainsKey('Hide3dObjects'))) {
|
||||||
$script:Params.Add('Hide3dObjects', $Hide3dObjects)
|
$script:Params.Add('Hide3dObjects', $Hide3dObjects)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Only add this option for Windows 11 users (build 22000+), if it doesn't already exist
|
||||||
|
if (($WinVersion -ge 22000) -and $script:ModernStandbySupported -and (-not $script:Params.ContainsKey('DisableModernStandbyNetworking'))) {
|
||||||
|
$script:Params.Add('DisableModernStandbyNetworking', $true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Custom mode, show & add options based on user input
|
# Custom mode, show & add options based on user input
|
||||||
@@ -1572,6 +1650,10 @@ switch ($script:Params.Keys) {
|
|||||||
RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." "Disable_Windows_Suggestions.reg"
|
RegImport "> Disabling tips, tricks, suggestions and ads across Windows..." "Disable_Windows_Suggestions.reg"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'DisableEdgeAds' {
|
||||||
|
RegImport "> Disabling ads and the MSN news feed in Microsoft Edge..." "Disable_Edge_Ads_And_Suggestions.reg"
|
||||||
|
continue
|
||||||
|
}
|
||||||
{$_ -in "DisableLockscrTips", "DisableLockscreenTips"} {
|
{$_ -in "DisableLockscrTips", "DisableLockscreenTips"} {
|
||||||
RegImport "> Disabling tips & tricks on the lockscreen..." "Disable_Lockscreen_Tips.reg"
|
RegImport "> Disabling tips & tricks on the lockscreen..." "Disable_Lockscreen_Tips.reg"
|
||||||
continue
|
continue
|
||||||
@@ -1608,6 +1690,10 @@ switch ($script:Params.Keys) {
|
|||||||
RegImport "> Disabling Windows Recall snapshots..." "Disable_AI_Recall.reg"
|
RegImport "> Disabling Windows Recall snapshots..." "Disable_AI_Recall.reg"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'DisableEdgeAI' {
|
||||||
|
RegImport "> Disabling AI features in Microsoft Edge..." "Disable_Edge_AI_Features.reg"
|
||||||
|
continue
|
||||||
|
}
|
||||||
'DisablePaintAI' {
|
'DisablePaintAI' {
|
||||||
RegImport "> Disabling AI features in Paint..." "Disable_Paint_AI_Features.reg"
|
RegImport "> Disabling AI features in Paint..." "Disable_Paint_AI_Features.reg"
|
||||||
continue
|
continue
|
||||||
@@ -1632,6 +1718,10 @@ switch ($script:Params.Keys) {
|
|||||||
RegImport "> Disabling Fast Start-up..." "Disable_Fast_Startup.reg"
|
RegImport "> Disabling Fast Start-up..." "Disable_Fast_Startup.reg"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'DisableModernStandbyNetworking' {
|
||||||
|
RegImport "> Disabling network connectivity during Modern Standby..." "Disable_Modern_Standby_Networking.reg"
|
||||||
|
continue
|
||||||
|
}
|
||||||
'ClearStart' {
|
'ClearStart' {
|
||||||
Write-Output "> Removing all pinned apps from the start menu for user $(GetUserName)..."
|
Write-Output "> Removing all pinned apps from the start menu for user $(GetUserName)..."
|
||||||
ReplaceStartMenu
|
ReplaceStartMenu
|
||||||
|
|||||||
Reference in New Issue
Block a user