A collection of Scripts which disable / remove Windows 10 Features and Apps
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.7 KiB

9 years ago
# Description:
# This script removes unwanted Apps that come with Windows. If you do not want
# to remove certain Apps comment out the corresponding lines below.
9 years ago
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
echo "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)
echo "Uninstalling default apps"
9 years ago
$apps = @(
# default Windows 10 apps
"Microsoft.3DBuilder"
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
"Microsoft.Getstarted"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.Office.OneNote"
"Microsoft.People"
"Microsoft.SkypeApp"
"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
"Microsoft.WindowsCalculator"
"Microsoft.WindowsCamera"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
"Microsoft.WindowsStore"
"Microsoft.XboxApp"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"microsoft.windowscommunicationsapps"
# apps from Windows 8 upgrade
"9E2F88E3.Twitter"
"Flipboard.Flipboard"
"Microsoft.MinecraftUWP"
"ShazamEntertainmentLtd.Shazam"
"king.com.CandyCrushSaga"
# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
9 years ago
)
foreach ($app in $apps) {
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage
9 years ago
Get-AppXProvisionedPackage -Online |
where DisplayName -EQ $app |
Remove-AppxProvisionedPackage -Online
9 years ago
}
echo "Force removing system apps"
$needles = @(
"BioEnrollment"
"ContactSupport"
"Cortana"
"Feedback"
"Flash"
"OneDrive"
"Xbox"
)
foreach ($needle in $needles) {
$pkgs = (ls "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" |
where Name -Like "*$needle*")
foreach ($pkg in $pkgs) {
$pkgname = $pkg.Name.split('\')[-1]
Takeown-Registry($pkg.Name)
Takeown-Registry($pkg.Name + "\Owners")
Set-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name Visibility -Value 1
New-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name DefVis -PropertyType DWord -Value 2
Remove-Item -Path ("HKLM:" + $pkg.Name.Substring(18) + "\Owners")
dism.exe /Online /Remove-Package /PackageName:$pkgname /NoRestart
}
}