Skip to content

Instantly share code, notes, and snippets.

@adryx92
Last active August 21, 2023 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adryx92/3e3999062a36b8109114aac6b068be14 to your computer and use it in GitHub Desktop.
Save adryx92/3e3999062a36b8109114aac6b068be14 to your computer and use it in GitHub Desktop.
Easily remove bloatware and install useful apps on Windows
# run as Administrator!
# set the PowerShell execution policy as unrestricted: Set-ExecutionPolicy unrestricted
# after running, restore the execution policy: Set-ExecutionPolicy restricted
function RemoveApps {
# credit to https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
Write-Output "Uninstalling default apps"
$apps = @(
# default Windows 10 apps
#"Microsoft.549981C3F5F10" #Cortana
"Microsoft.3DBuilder"
#"Microsoft.Appconnector"
"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"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore" # can't be re-installed
"Microsoft.Xbox.TCUI"
"Microsoft.XboxApp"
"Microsoft.XboxGameOverlay"
"Microsoft.XboxSpeechToTextOverlay"
"Microsoft.YourPhone"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
# Threshold 2 apps
"Microsoft.CommsPhone"
"Microsoft.ConnectivityStore"
"Microsoft.GetHelp"
"Microsoft.Getstarted"
"Microsoft.Messaging"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.WindowsFeedbackHub"
# Creators Update apps
"Microsoft.Microsoft3DViewer"
#"Microsoft.MSPaint"
#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingHealthAndFitness"
"Microsoft.BingTravel"
"Microsoft.WindowsReadingList"
# Redstone 5 apps
"Microsoft.MixedReality.Portal"
#"Microsoft.ScreenSketch"
"Microsoft.XboxGamingOverlay"
# non-Microsoft
"2FE3CB00.PicsArt-PhotoStudio"
"46928bounde.EclipseManager"
"4DF9E0F8.Netflix"
"613EBCEA.PolarrPhotoEditorAcademicEdition"
"6Wunderkinder.Wunderlist"
"7EE7776C.LinkedInforWindows"
"89006A2E.AutodeskSketchBook"
"9E2F88E3.Twitter"
"A278AB0D.DisneyMagicKingdoms"
"A278AB0D.MarchofEmpires"
"ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
"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"
"SpotifyAB.SpotifyMusic"
"TheNewYorkTimes.NYTCrossword"
"ThumbmunkeysLtd.PhototasticCollage"
"TuneIn.TuneInRadio"
"WinZipComputing.WinZipUniversal"
"XINGAG.XING"
"flaregamesGmbH.RoyalRevolt2"
"king.com.*"
"king.com.BubbleWitch3Saga"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
"A025C540.Yandex.Music"
# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
# apps which other apps depend on
"Microsoft.Advertising.Xaml"
)
$appxprovisionedpackage = Get-AppxProvisionedPackage -Online
foreach ($app in $apps) {
Write-Output "Trying to remove $app"
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers
($appxprovisionedpackage).Where( {$_.DisplayName -EQ $app}) |
Remove-AppxProvisionedPackage -Online
}
}
function InstallApps {
Write-Output "Installing custom apps"
$apps = @(
"7zip.7zip"
"Mozilla.Firefox"
"Microsoft.VisualStudioCode"
"Notepad++.Notepad++"
"WinMerge.WinMerge"
"WinSCP.WinSCP"
"REALiX.HWiNFO"
"Foxit.FoxitReader"
"Mythicsoft.AgentRansack"
# "PuTTY.PuTTY"
)
foreach ($app in $apps) {
winget install --accept-source-agreements -e --id $app
}
}
RemoveApps
InstallApps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment