Uninstall Windows/ Microsoft Store Apps

SOTI MobiControl
Windows

Windows 10 includes a set of pre-installed apps, but not all may be necessary for an organization. With SOTI MobiControl, administrators can deploy scripts to uninstall Windows Store apps, ensuring a streamlined and optimized device environment.

Important:
  • It is recommended to test the script on a local/ test machine for its purpose and effects. 
  • SOTI MobiControl will not be responsible for any damage/loss to the data/setup based on the behavior of the script.

Find every package full name

1 Get-AppxPackage | Select-Object Name, PackageFullName

Find specific package full name

1 Get-AppxPackage | Where-Object { $_.Name -like "*AppName*" } | Select-Object Name, PackageFullName

Remove specific pre-installed apps

1 # Define the Appx package names to be removed. Modify this list as needed.
2 $appsToRemove = @(
3 "*Microsoft.BingWeather*",
4 "*Microsoft.GetHelp*",
5 "*Microsoft.Getstarted*",
6 "*Microsoft.Messaging*"
7 # Add other package names as needed
8 )
9 foreach ($app in $appsToRemove) {
10 Write-Output "Attempting to remove app $app for all users"
11 try {
12 # Remove the provisioned app package from the system (affects all users)
13 Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object {
14 Write-Output "Removing provisioned app $($_.PackageName)"
15 Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName
16 }
17 # Additionally, remove any installed instance of the app from the system
18 Get-AppxPackage -AllUsers | Where-Object { $_.PackageFullName -like $app } | ForEach-Object {
19 Write-Output "Removing installed app $($_.PackageFullName)"
20 Remove-AppxPackage -Package $_.PackageFullName -AllUsers
21 }
22 } catch {
23 Write-Output "Failed to remove app $app. Error: $_"
24 }
25 }

Was this helpful?

Need more help?
Ask Community