mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Added comments to make the script more readable
This commit is contained in:
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ko_fi: raphire
|
||||||
11
README.md
11
README.md
@@ -1,7 +1,7 @@
|
|||||||
# Win10Debloat
|
# Win10Debloat
|
||||||
Win10Debloat is a simple powershell script that allows you to remove most pre-installed windows 10/11 apps, disable bing in windows search, disable tips and suggestions across the OS (such as the lockscreen, startmenu and settings) and declutter the windows explorer by hiding certain folders (such as 3D objects) from the sidebar aswell as disabling certain context menu options that a regular user would likely never use.
|
Win10Debloat is a simple and lightweight powershell script that removes pre-installed windows 10/11 bloatware apps and declutters the experience by disabling or removing intrusive interface elements and context menu items. The script is specifically designed to be simple, quick and most importantly safe to run, it does not touch any essential windows files, settings or programs that could cause issues in the future.
|
||||||
|
|
||||||
You can pick and choose which modifications you want the script to make, but the default settings should be fine for most people. All of the changes can be reverted using the registry files that are included in the 'Regfiles' folder, and all of the apps that are removed by default can easily be reinstalled from the microsoft store.
|
You can pick and choose exactly which modifications you want the script to make, but the default settings should be fine for most people. All of the changes can be reverted using the registry files that are included in the 'Regfiles' folder, and all of the apps that are removed by default can easily be reinstalled from the microsoft store.
|
||||||
|
|
||||||
### The windows 10 default settings will:
|
### The windows 10 default settings will:
|
||||||
- Remove all bloatware apps from [this list](#these-apps-will-be-deleted-by-default).
|
- Remove all bloatware apps from [this list](#these-apps-will-be-deleted-by-default).
|
||||||
@@ -21,7 +21,12 @@ You can pick and choose which modifications you want the script to make, but the
|
|||||||
|
|
||||||
### Or select the 'Advanced' option in the menu to customize the script to your needs.
|
### Or select the 'Advanced' option in the menu to customize the script to your needs.
|
||||||
|
|
||||||
|
## Donate a cup of coffee to support my work
|
||||||
|
[](https://ko-fi.com/M4M5C6UPC)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
Disclaimer: I believe this script to be completely safe to run, but use this script at your own risk!
|
||||||
|
|
||||||
### Easy method:
|
### Easy method:
|
||||||
1. [Download the latest version of the script](https://github.com/Raphire/Win10Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
1. [Download the latest version of the script](https://github.com/Raphire/Win10Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
||||||
2. Run the script by right-clicking the 'Run.ps1' file and selecting the 'Run with Powershell' option.
|
2. Run the script by right-clicking the 'Run.ps1' file and selecting the 'Run with Powershell' option.
|
||||||
@@ -35,7 +40,7 @@ This method is a bit more complicated, but it gives you the option to run the sc
|
|||||||
2. Open powershell as an administrator.
|
2. Open powershell as an administrator.
|
||||||
3. Enable powershell execution by entering the following command: <code>Set-ExecutionPolicy Unrestricted -Force</code>
|
3. Enable powershell execution by entering the following command: <code>Set-ExecutionPolicy Unrestricted -Force</code>
|
||||||
4. In powershell, navigate to the directory where the files were extracted. Example: <code>cd c:\\Win10Debloat</code>
|
4. In powershell, navigate to the directory where the files were extracted. Example: <code>cd c:\\Win10Debloat</code>
|
||||||
5. Enter this into powershell to run the script: <code>.\Win10Debloat.ps1</code> To run the script with arguments simply add them at the end, as can be seen in this example: <code>.\Win10Debloat.ps1 -RemoveApps -DisableBingSearches</code>
|
5. Enter this into powershell to run the script: <code>.\Win10Debloat.ps1</code> To run the script without any user input you can add arguments at the end, for example: <code>.\Win10Debloat.ps1 -RemoveApps -DisableBingSearches</code>
|
||||||
|
|
||||||
| Argument | Description |
|
| Argument | Description |
|
||||||
| --------- | ----------- |
|
| --------- | ----------- |
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ param
|
|||||||
[Parameter(ValueFromPipeline=$true)][switch]$DisableShare
|
[Parameter(ValueFromPipeline=$true)][switch]$DisableShare
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Removes all apps in the list
|
||||||
function RemoveApps
|
function RemoveApps
|
||||||
{
|
{
|
||||||
Write-Output "> Removing pre-installed windows 10 apps..."
|
Write-Output "> Removing pre-installed windows 10 apps..."
|
||||||
@@ -84,6 +85,7 @@ function RemoveApps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Import & execute regfile
|
||||||
function RegImport
|
function RegImport
|
||||||
{
|
{
|
||||||
param
|
param
|
||||||
@@ -96,6 +98,7 @@ function RegImport
|
|||||||
reg import $path
|
reg import $path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Change mode based on provided parameters or user input
|
||||||
if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (($PSBoundParameters.Count -eq 1) -and ($PSBoundParameters.ContainsKey('WhatIf') -or $PSBoundParameters.ContainsKey('Confirm') -or $PSBoundParameters.ContainsKey('Verbose'))))
|
if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (($PSBoundParameters.Count -eq 1) -and ($PSBoundParameters.ContainsKey('WhatIf') -or $PSBoundParameters.ContainsKey('Confirm') -or $PSBoundParameters.ContainsKey('Verbose'))))
|
||||||
{
|
{
|
||||||
if($RunDefaults)
|
if($RunDefaults)
|
||||||
@@ -121,6 +124,7 @@ if((-NOT $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ((
|
|||||||
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3')
|
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Add execution parameters based on the mode
|
||||||
switch($Mode)
|
switch($Mode)
|
||||||
{
|
{
|
||||||
'1'
|
'1'
|
||||||
@@ -218,6 +222,7 @@ else
|
|||||||
Write-Output "-------------------------------------------------------------------------------------------"
|
Write-Output "-------------------------------------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Execute all selected/provided parameters
|
||||||
switch ($PSBoundParameters.Keys)
|
switch ($PSBoundParameters.Keys)
|
||||||
{
|
{
|
||||||
'RemoveApps'
|
'RemoveApps'
|
||||||
@@ -266,4 +271,4 @@ Write-Output ""
|
|||||||
Write-Output "Script completed! Please restart your PC to make sure all changes are properly applied."
|
Write-Output "Script completed! Please restart your PC to make sure all changes are properly applied."
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output "Press any key to continue..."
|
Write-Output "Press any key to continue..."
|
||||||
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||||
|
|||||||
Reference in New Issue
Block a user