-
Notifications
You must be signed in to change notification settings - Fork 1
/
debloat.ps1
193 lines (178 loc) · 5.42 KB
/
debloat.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
### Debloating ###
# Based on this gist: https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
$bloatware = @(
# default Windows 11 apps
"MicrosoftTeams"
"Microsoft.Todos"
"Microsoft.PowerAutomateDesktop"
# Win 11 22h2
"Clipchamp.Clipchamp"
"MicrosoftCorporataionII.MicrosoftFamily"
"BytedancePte.Ltd.TikTok"
"FACEBOOK.317180B0BB486"
"Facebook.Instagram*"
"22364Disney.ESPN*"
# Windows 11 23h2
"Microsoft.OutlookForWindows"
"Microsoft.Windows.DevHomeAzureExtension" # DEV Home
"Microsoft.Windows.Ai.Copilot.Provider" # Copilot
# default Windows 10 apps
"Microsoft.549981C3F5F10" # Cortana Offline
"Microsoft.OneDriveSync" # Onedrive
"Microsoft.3DBuilder"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingTranslator"
"Microsoft.BingWeather"
"Microsoft.FreshPaint"
#"Microsoft.GamingServices"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.MicrosoftStickyNotes"
"Microsoft.MinecraftUWP"
"Microsoft.NetworkSpeedTest"
"Microsoft.Office.OneNote"
"Microsoft.People"
"Microsoft.Print3D"
"Microsoft.SkypeApp"
"Microsoft.Wallet"
#"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
#"Microsoft.WindowsCalculator"
#"Microsoft.WindowsCamera"
#"microsoft.windowscommunicationsapps" # Mail and Calender
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore" # can't be re-installed
"Microsoft.ZuneVideo"
"Microsoft.YourPhone"
#"Microsoft.MSPaint" # Paint & Paint3D
#"Microsoft.ZuneMusic" # New Media Player in Windows
# Xbox Apps
#"Microsoft.Xbox.TCUI"
#"Microsoft.XboxApp"
#"Microsoft.XboxGameOverlay"
#"Microsoft.XboxSpeechToTextOverlay"
#"Microsoft.XboxGamingOverlay"
#"Microsoft.XboxIdentityProvider"
#"Microsoft.XboxSpeechToTextOverlay"
# Threshold 2 apps
"Microsoft.GetHelp"
"Microsoft.Getstarted"
"Microsoft.Messaging"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.WindowsFeedbackHub"
# Creators Update apps
"Microsoft.Microsoft3DViewer"
#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingHealthAndFitness"
"Microsoft.BingTravel"
"Microsoft.WindowsReadingList"
# Redstone 5 apps
"Microsoft.MixedReality.Portal"
"Microsoft.Whiteboard"
# non-Microsoft
#"4DF9E0F8.Netflix"
#"SpotifyAB.SpotifyMusic"
"2FE3CB00.PicsArt-PhotoStudio"
"46928bounde.EclipseManager"
"613EBCEA.PolarrPhotoEditorAcademicEdition"
"6Wunderkinder.Wunderlist"
"7EE7776C.LinkedInforWindows"
"89006A2E.AutodeskSketchBook"
"9E2F88E3.Twitter"
"A278AB0D.DisneyMagicKingdoms"
"A278AB0D.MarchofEmpires"
"ActiproSoftwareLLC.562882FEEB491"
"CAF9E577.Plex"
"ClearChannelRadioDigital.iHeartRadio"
"D52A8D61.FarmVille2CountryEscape"
"D5EA27B7.Duolingo-LearnLanguagesforFree"
"DB6EA5DB.CyberLinkMediaSuiteEssentials"
"DolbyLaboratories.DolbyAccess"
"DolbyLaboratories.DolbyAccess"
"Drawboard.DrawboardPDF"
"Facebook.Facebook"
"Fitbit.FitbitCoach"
"Flipboard.Flipboard"
"GAMELOFTSA.Asphalt8Airborne"
"KeeperSecurityInc.Keeper"
"NORDCURRENT.COOKINGFEVER"
"PandoraMediaInc.29680B314EFC2"
"Playtika.CaesarsSlotsFreeCasino"
"ShazamEntertainmentLtd.Shazam"
"SlingTVLLC.SlingTV"
"TheNewYorkTimes.NYTCrossword"
"ThumbmunkeysLtd.PhototasticCollage"
"TuneIn.TuneInRadio"
"WinZipComputing.WinZipUniversal"
"XINGAG.XING"
"flaregamesGmbH.RoyalRevolt2"
"king.com.*"
"king.com.BubbleWitch3Saga"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
);
function debloating {
Clear-Host
Write-Host -ForegroundColor Cyan "Removing bloatware..."
Foreach ($blt in $bloatware) {
$package = Get-AppxPackage -AllUsers $blt
if ($package -ne $null) {
Write-Host -ForegroundColor Red "Removing: $blt"
$package | Remove-AppxPackage
} else {
Write-Host "$blt not found. Skip..."
}
}
Pause
}
### Finished ###
function finish {
Write-Host
Write-Host -ForegroundColor Magenta "Debloating finished"
Write-Host
Pause
}
function check_rights {
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
Write-Warning "The script needs to be executed with administrator privileges."
Break
}
}
### Question what to do ###
function menu {
[string]$Title = 'Win11 Refresh: Debloat Menu'
Clear-Host
Write-Host "================ $Title ================"
Write-Host
Write-Host "1: Start debloating script"
Write-Host
Write-Host -ForegroundColor Magenta "0: Quit"
Write-Host
$actions = "0"
while ($actions -notin "0..1") {
$actions = Read-Host -Prompt 'What you want to do?'
if ($actions -in 0..7) {
if ($actions -eq 0) {
exit
}
if ($actions -eq 1) {
debloating
finish
}
menu
}
else {
menu
}
}
}
check_rights
menu