Link to home
Start Free TrialLog in
Avatar of Brian
BrianFlag for United States of America

asked on

Remove Windows 10 Apps with PowerShell

Hello Experts,

I have the following PowerShell Script that I found online to remove Windows 10 Apps from Enterprise. The Script does not seem to run properly. When I run it will not remove some of the Apps. The error message for the Apps that it does not remove is "Unable to find provisioned package"

Below is the Script:
($AppsList = "Microsoft.Office.Sway","Microsoft.RemoteDesktop","Microsoft.MicrosoftPowerBIForWindows","Microsoft.NetworkSpeedTest","46928bounde.EclipseManager","D5EA27B7.Duolingo-LearnLanguagesforFree","AdobeSystemsIncorporated.AdobePhotoshopExpress","Microsoft.Getstarted","Microsoft.Messaging","Microsoft.BingWeather","Microsoft.BingNews","Microsoft.3DBuilder","Microsoft.Microsoft3DViewer","Microsoft.MicrosoftOfficeHub","Microsoft.MicrosoftSolitaireCollection","Microsoft.Office.OneNote","Microsoft.OneConnect","Microsoft.People","Microsoft.WindowsFeedbackHub","Microsoft.WindowsMaps","Microsoft.XboxApp","Microsoft.ZuneVideo","Microsoft.ZuneMusic","Microsoft.SkypeApp","Microsoft.WindowsAlarms","microsoft.windowscommunicationsapps","Microsoft.Windows.Photos","ActiproSoftwareLLC.562882FEEB491","PandoraMediaInc.29680B314EFC2","Microsoft.WindowsStore")

ForEach ($App in $AppsList)
{
$PackageFullName = (Get-AppxPackage $App).PackageFullName
$ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
write-host $PackageFullName
Write-Host $ProPackageFullName
if ($PackageFullName)
{
Write-Host "Removing Package: $App"
remove-AppxPackage -package $PackageFullName
}
else
{
Write-Host "Unable to find package: $App"
}
if ($ProPackageFullName)
{
Write-Host "Removing Provisioned Package: $ProPackageFullName"
Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName
}
else
{
Write-Host "Unable to find provisioned package: $App"
}

}

Open in new window


Now if I run get-appxpackage namebelow | remove-appxpackage for each one they are get removed (but I have to run that command for each one :(

Microsoft.WindowsStore
PandoraMediaInc.29680B314EFC2
ActiproSoftwareLLC.562882FEEB491
Microsoft.Windows.Photos
microsoft.windowscommunicationsapps
Microsoft.WindowsAlarms
Microsoft.SkypeApp
Microsoft.ZuneMusic
Microsoft.ZuneVideo
Microsoft.XboxApp
Microsoft.WindowsMaps
Microsoft.WindowsFeedbackHub
Microsoft.People
Microsoft.OneConnect
Microsoft.Office.OneNote
Microsoft.MicrosoftSolitaireCollection
Microsoft.MicrosoftOfficeHub
Microsoft.Microsoft3DViewer
Microsoft.3DBuilder
Microsoft.BingNews
Microsoft.BingWeather
Microsoft.Messaging
Microsoft.Getstarted
AdobeSystemsIncorporated.AdobePhotoshopExpress
D5EA27B7.Duolingo-LearnLanguagesforFree
46928bounde.EclipseManager
Microsoft.NetworkSpeedTest
Microsoft.MicrosoftPowerBIForWindows
Microsoft.RemoteDesktop                            
Microsoft.Office.Sway
ASKER CERTIFIED SOLUTION
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you wanted to remove all of the apps in one go you could try this command.

Get-AppxPackage | Remove-AppxPackage
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial