mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Compare commits
4 Commits
2025.08.16
...
properly-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9de9b353d | ||
|
|
b27971933e | ||
|
|
b100cf15f2 | ||
|
|
b6dc5c0147 |
@@ -7,6 +7,7 @@ Win11Debloat will make the following changes:
|
||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||
- Disable & remove Microsoft Copilot. (W11 only)
|
||||
- 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.
|
||||
- Hide the 3D objects folder in Windows Explorer. (W10 only)
|
||||
- Disable the widget service & hide the icon from the taskbar.
|
||||
|
||||
@@ -54,6 +54,7 @@ Start
|
||||
Other
|
||||
- Disable Xbox game/screen recording, this also stops gaming overlay popups.
|
||||
- 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.
|
||||
- Sysprep mode to apply changes to the Windows Default user profile.
|
||||
|
||||
|
||||
1
Get.ps1
1
Get.ps1
@@ -19,6 +19,7 @@ param (
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||
[switch]$DisableDesktopSpotlight,
|
||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||
|
||||
@@ -47,7 +47,7 @@ Download & run the script automatically via PowerShell.
|
||||
3. Wait for the script to automatically download Win11Debloat.
|
||||
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
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>
|
||||
|
||||
## Features
|
||||
@@ -151,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 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.
|
||||
- [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.
|
||||
|
||||
@@ -170,6 +171,7 @@ Win11Debloat offers a default mode that allows you to quickly and easily apply t
|
||||
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
|
||||
- Disable & remove Microsoft Copilot. (W11 only)
|
||||
- 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.
|
||||
- Hide the 3D objects folder under 'This pc' from File Explorer. (W10 only)
|
||||
- Disable the widget service & hide the icon from the taskbar.
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -21,6 +21,7 @@ param (
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||
[switch]$DisableDesktopSpotlight,
|
||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||
@@ -541,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
|
||||
function RegImport {
|
||||
param (
|
||||
@@ -1006,6 +1036,15 @@ function DisplayCustomModeOptions {
|
||||
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
|
||||
if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -or $script:Params.ContainsKey('RevertContextMenu')) {
|
||||
Write-Output ""
|
||||
@@ -1287,6 +1326,9 @@ else {
|
||||
# Get current Windows build version to compare against features
|
||||
$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:FirstSelection = $true
|
||||
$SPParams = 'WhatIf', 'Confirm', 'Verbose', 'Silent', 'Sysprep', 'Debug', 'User', 'CreateRestorePoint', 'LogPath'
|
||||
@@ -1443,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'))) {
|
||||
$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
|
||||
@@ -1671,6 +1718,10 @@ switch ($script:Params.Keys) {
|
||||
RegImport "> Disabling Fast Start-up..." "Disable_Fast_Startup.reg"
|
||||
continue
|
||||
}
|
||||
'DisableModernStandbyNetworking' {
|
||||
RegImport "> Disabling network connectivity during Modern Standby..." "Disable_Modern_Standby_Networking.reg"
|
||||
continue
|
||||
}
|
||||
'ClearStart' {
|
||||
Write-Output "> Removing all pinned apps from the start menu for user $(GetUserName)..."
|
||||
ReplaceStartMenu
|
||||
|
||||
Reference in New Issue
Block a user