Home > Software engineering >  C# - PowerShell object execute Remove-AppxPackage successfully but unable to remove application from
C# - PowerShell object execute Remove-AppxPackage successfully but unable to remove application from

Time:05-25

I want to remove the application from another user account (Specific selected user) I used below query Remove-AppxPackage -Package FACEBOOK.FACEBOOK_2021.927.1.0_neutral__8xx8rvfyw5nnt -User S-1-5-21-1982064058-2852822003-722279830-1009

Format Remove-AppxPackage -Package (PackageFullName) -User (User.SID)

above query work on login user but not working for other users

CodePudding user response:

Have you tried the '-Force' option?

CodePudding user response:

Below script format work for me

Get-AppxPackage -User SID | Where PackageFullName -eq packagefullname | Remove-AppxPackage -User

script

Get-AppxPackage -User S-1-5-21-1982064058-2852822003-722279830-1009 | Where PackageFullName -eq FACEBOOK.FACEBOOK_2021.927.1.0_neutral__8xx8rvfyw5nnt | Remove-AppxPackage -User S-1-5-21-1982064058-2852822003-722279830-1009

  • Related