remove Provisioned Win10 Apps using powershell

I am trying to remove Provisioned Win10 Apps using powershell.

Input:
Get-AppxProvisionedPackage -online

Output:
DisplayName
Microsoft.BingWeather

PackageName
Microsoft.BingWeather_4.23.10923.0_neutral_~_8wekyb3d8bbwe



so that proves its there, so something really simple to remove just this app like:
Remove-AppXProvisionedPackage -Online -PackageName Microsoft.BingWeather_4.23.10923.0_neutral_~_8wekyb3d8bbwe


give "Unspecified error"...why?

as does:
$App = Get-AppXProvisionedPackage -Online | Where {$_.DisplayName -eq "Microsoft.BingWeather" }
Remove-AppXProvisionedPackage -Online -PackageName $App.PackageName
LVL 1
PeteAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

McKnifeCommented:
Should work. What's your build number of win10?
0
PeteAuthor Commented:
1803
0
PeteAuthor Commented:
cant get it to work on 1709 either.
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

McKnifeCommented:
1803 is the same as mine, but weather has the version 4.22 here - what build of 1803, please? Use the command winver to find out.
0
PeteAuthor Commented:
Build - 17134.1
0
McKnifeCommented:
Ok, whatever. Here at home, 17134.5, it has the same version as yours and removal works.
Retry starting powershell as another administrative user.
0
PeteAuthor Commented:
Ok, will try tomorrow.

So I don't need to be too specific with names I'd prefer the second command:

$App = Get-AppXProvisionedPackage -Online | Where {$_.DisplayName -eq "Microsoft.BingWeather" }
Remove-AppXProvisionedPackage -Online -PackageName $App.PackageName


Do u agree? Maybe something better?

Thanks
0
McKnifeCommented:
No, it's perfect that way. You could also install the may cumulative update (out since yesterday) and retry after a reboot: http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.