The article logic is indeed correct, but the commands are not
The following works fine in 1909 (I was actually working on this today):
Remove for all users by exact package name
Get-AppXPackage Microsoft.SkypeApp* -AllUsers (to see who has it and get the package name)
Remove-AppxPackage -Package “Microsoft.SkypeApp_15.63.76.0_x86__kzf8qxf38zg5c” -AllUsers
Get-AppXPackage Microsoft.SkypeApp -AllUsers* - (to test if it was removed)
Remove it from the Provision as well so it doesn’t get reinstalled
Get-AppxProvisionedPackage -Online | where {$_.PackageName -like “Skype”} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
Remove for a specific user (requires SID)
Get-LocalUser “username” SID (local)
Get-ADUser -Identity “username” | select SID (domain)
Remove-AppxPackage -Package “Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c” -User “S-1-5-21-3843027404-195005032-2178188288-1004”
Scripted app name (two lines. Having issues with an one-liner passing over the package name - wip)
$AppToBeRemoved = Get-AppxPackage Microsoft.SkypeApp* -AllUsers | Select-Object -ExpandProperty PackageFullName
Remove-AppxPackage -Package “"$AppToBeRemoved
”" -AllUsers
On some machines I had errors running this command:
Remove-AppxPackage -Package “Microsoft.SkypeApp_15.63.76.0_x86__kzf8qxf38zg5c” -AllUsers
The issue is the package manager is in a bad state. I was able to fix it by running this (it has no effect other than forcing the package manager to re-initialize), then re-run the initial command
Remove-AppxPackage -Package “Microsoft.SkypeApp_15.63.76.0_x86__kzf8qxf38zg5c”
Reference:
Remove-AppxPackage
[-Package]
[-AllUsers]
[-WhatIf]
[-Confirm]
Parameters
-AllUsers
This cmdlet removes the app package for all user accounts on the computer. This cmdlet works off the parent package type. If it is a bundle, use -PackageTypeFilter and specify the bundle. To use this parameter, you must run the command by using administrator permissions.