SimpleHelp Community

Skype Uninstall with Powershell


#1

I cannot get the following command to run via the Powershell toolbox.

It runs fine if I execute it via the Powershell GUI, or if I run the RemoveSkype.ps1 manually.

Any help is appreciated:

Remove-AppxPackage -Package “Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c”


#2

Hi Drew,

The toolbox tool will be running as SYSTEM and as this is an AppX Package is likely tied to the user themselves, so it isn’t seeing the package under SYSTEM and taking no action.

If you use this syntax:

Get-AppxPackage -allusers Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c | Remove-AppxPackage

This should hopefully do the trick. One suggestion I’d have is maybe to change it to:
Get-AppxPackage -allusers *SkypeApp* | Remove-AppxPackage

Then this would cover you for future use cases, as the PackageFullName will likely change in the future or an outdated version is installed on a system.


#3

Thanks Anthony, although your solutions didn’t throw any errors, it didn’t remove the Skype App via a Toolbox.
Again, they do work via the Powershell GUI.

And this threw an error:
Remove-AppxPackage -Package “Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c” -AllUsers


#4

This article explains why it isn’t working.

Bottom line, I need to create a .bat file that executes the PowerShell script on next login. This will execute the script as the user, and not the system.


#5

Good Find. I use PDQ alot. They have good products and suggestions. Does seem odd MS doesnt even let the -AllUsers Command work as a system user. I tried several ways to get around it and was unsuccessful.


#6

Nice one @Drew_Helgeson! Interesting reading.

These Appx packages are definitely a paradigm shift in how we go about our job. A lot of my users rely on OneDrive and a large percentage of helpdesk tickets are regarding this, and it takes a while to figure out how to create solutions that run as the logged in user to resolve OneDrive issues via the RMM. Thanks for linking the article.