Skip to content

Commit edb0fdc

Browse files
authored
Add files via upload
Upload WTFPL licence and badge image for README.md Upload v1.0 of nuke-windows-bloat.ps1 Tests are not required since this is a basic script, `pester` can be installed via PowerShell if it's *really* needed.
1 parent 560ab59 commit edb0fdc

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

LICENCE.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
5+
6+
Everyone is permitted to copy and distribute verbatim or modified
7+
copies of this license document, and changing it is allowed as long
8+
as the name is changed.
9+
10+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12+
13+
0. You just DO WHAT THE FUCK YOU WANT TO.
14+

nuke-windows-bloat.ps1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This script is designed to remove unnecessary or bloatware AppxPackages from Windows.
2+
# Usage: Run this script in PowerShell with administrator privileges.
3+
# Prerequisites: Ensure you have administrative rights to execute this script.
4+
5+
# Check if the script is running with elevated privileges
6+
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
7+
Write-Host "This script must be run as an administrator." -ForegroundColor Red
8+
exit
9+
}
10+
11+
# Determine and print the Windows version
12+
$windowsVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName
13+
Write-Host "[INFO] Windows Version: $windowsVersion"
14+
15+
# Define a list of AppxPackages to remove
16+
# These packages are considered unnecessary or bloatware for many users,
17+
# and their removal can help streamline the system and free up resources.
18+
$appxPackages = @(
19+
"*Microsoft.YourPhone*",
20+
"*Microsoft.Getstarted*",
21+
"*Microsoft.GetHelp*",
22+
"*Microsoft.XboxGamingOverlay*"
23+
)
24+
25+
# Loop through each package and attempt to remove it
26+
foreach ($package in $appxPackages) {
27+
try {
28+
# Get the package
29+
$appxPackage = Get-AppxPackage | Where-Object { $_.Name -like $package }
30+
if ($appxPackage) {
31+
# Remove the package
32+
Write-Host "Error removing package: $package. Exception: $($_.Exception.Message)"
33+
Write-Host "Successfully removed: $package"
34+
} else {
35+
Write-Host "Package not found: $package"
36+
}
37+
} catch {
38+
Write-Host "Error removing package: $package. Error: $_"
39+
}
40+
}

wtfpl-badge-2.png

1.2 KB
Loading

0 commit comments

Comments
 (0)