Created
January 19, 2024 06:24
-
-
Save hl2guide/5219f44f9a59380d941de8b87ab716f5 to your computer and use it in GitHub Desktop.
Removes Microsoft Store apps that are not needed or are security risks for most people. Must be run as Admin in PowerShell 7 or later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Removes Microsoft Store apps that are not needed or are security risks for most people. | |
# Must be run as Admin in PowerShell 7 or later. | |
$packageName = '' | |
function Remove-MSStoreApp() | |
{ | |
Param($Name) | |
$packageName = Get-AppxPackage -Name $Name | ` | |
Select-Object -Property 'PackageFullName' ` | |
-ErrorAction SilentlyContinue | |
$packageName = $packageName.PackageFullName | |
if($packageName) | |
{ | |
Remove-AppxPackage -Package $packageName #-WhatIf | |
} | |
#exit | |
} | |
Remove-MSStoreApp -Name 'Microsoft.BingNews' | |
Remove-MSStoreApp -Name 'Microsoft.BingWeather' | |
Remove-MSStoreApp -Name 'Microsoft.MicrosoftStickyNotes' | |
Remove-MSStoreApp -Name 'Microsoft.PowerAutomateDesktop' | |
Remove-MSStoreApp -Name 'Microsoft.Todos' | |
Remove-MSStoreApp -Name 'Microsoft.Windows.DevHome' | |
Remove-MSStoreApp -Name 'Microsoft.WindowsCamera' | |
Remove-MSStoreApp -Name 'Microsoft.WindowsMaps' | |
Remove-MSStoreApp -Name 'Microsoft.YourPhone' | |
Remove-MSStoreApp -Name 'MicrosoftCorporationII.QuickAssist' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment