# Skype Uninstall with Powershell

**URL:** <https://community.simple-help.com/t/skype-uninstall-with-powershell/536>\
**Category:** Alerts and Toolboxes\
**Created:** [July 23, 2020, 10:44pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536 "2020-07-23T22:44:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [July 23, 2020, 10:44pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/1 "2020-07-23T22:44:34Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![Anthony](https://community.simple-help.com/letter_avatar_proxy/v4/letter/a/49beb7/32.png) [@Anthony](https://community.simple-help.com/u/Anthony)\
**Post date:** [July 24, 2020, 12:36pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/2 "2020-07-24T12:36:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [July 24, 2020, 6:55pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/3 "2020-07-24T18:55:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [July 27, 2020, 4:27pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/4 "2020-07-27T16:27:00Z")

</div>

This article explains why it isn’t working.

> **[PDQ.com](https://www.pdq.com/blog/remove-appx-packages/)**
>
> First, you’ll see how to write and deploy a script to remove the applications, then we’ll look at an option for removing the application for all users on a workstation.

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.

---

<div class="post-metadata">

**Author:** ![Darrell\_Swafford](https://community.simple-help.com/user_avatar/community.simple-help.com/darrell_swafford/32/82_2.png) [@Darrell\_Swafford](https://community.simple-help.com/u/Darrell_Swafford)\
**Post date:** [July 27, 2020, 4:53pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/5 "2020-07-27T16:53:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Anthony](https://community.simple-help.com/letter_avatar_proxy/v4/letter/a/49beb7/32.png) [@Anthony](https://community.simple-help.com/u/Anthony)\
**Post date:** [July 28, 2020, 12:14pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/6 "2020-07-28T12:14:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://community.simple-help.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mike\_D](https://community.simple-help.com/u/Mike_D)\
**Post date:** [August 16, 2020, 6:22am UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/7 "2020-08-16T06:22:09Z")

</div>

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 (Appx)](https://learn.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=windowsserver2025-ps&viewFallbackFrom=win10-ps)**
>
> Removes an app package from one or more user accounts.

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.

---

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [August 17, 2020, 2:40pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/8 "2020-08-17T14:40:31Z")

</div>

Thanks for the info Mike. I tested these in SimpleHelp (that runs a PowerShell script as SYSTEM) and they don’t work. Like I said in my original post, it will work if you run them manually, but not as SYSTEM.

Have you been able to get any to work using a toolbox? I’m still at a loss.

I did talk to support at PDQ about the article I linked, and they said they were able to fix this issue in PDQ and it will be in their next release. They wouldn’t tell me more, so I don’t know if they found a workaround, or if they got Microsoft to fix something and they are waiting for a patch. I don’t use PDQ, so I’ll wait to see what happens next.

Please let me know if you got this to work.

Thanks

Drew

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://community.simple-help.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mike\_D](https://community.simple-help.com/u/Mike_D)\
**Post date:** [August 18, 2020, 1:49pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/9 "2020-08-18T13:49:57Z")

</div>

Hey Drew,  
I am running as a toolbox without any issues with SH  
Send me a DM and I can email you my TB to test (just in case)

 ![16%20AM](https://community.simple-help.com/uploads/default/original/1X/29ff82dbae9b8b9ae6150c8f20edd33a480d887c.png) ![35%20AM](https://community.simple-help.com/uploads/default/original/1X/72405fc32c243fe3f1068ca69c18eb846b402775.png)

---

<div class="post-metadata">

**Author:** ![Darrell\_Swafford](https://community.simple-help.com/user_avatar/community.simple-help.com/darrell_swafford/32/82_2.png) [@Darrell\_Swafford](https://community.simple-help.com/u/Darrell_Swafford)\
**Post date:** [August 20, 2020, 3:31pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/10 "2020-08-20T15:31:54Z")

</div>

Mike if you do have this working, be sure to post your toolbox for it in the shared toolboxes section.  
I would like to have it too. 🙂

---

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [August 21, 2020, 3:55am UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/11 "2020-08-21T03:55:34Z")

</div>

Yes, Mike\_D, please share the details. This is what I ended up doing:

Prerequisites: I already have an account on each PC with the same ID/Password that made this possible.

1. I created a toolbox with the following script line. This created a single task that executed as the local user at a specific time and then never runs again. The RemoveSkype.bat file was a resource added to the toolbox:  
**SCHTASKS /CREATE /SC ONCE /RU UserNameHere /TN RunOnce /TR “C:\Scripts\RemoveSkype.bat” /ST 21:30**

2. In the RemoveSkype.bat, I had the following lines to remove the 2 current versions of skype, and then to delete the task called RunOnce (created in step 1):  
**powershell Remove-AppxPackage -Package "Microsoft.SkypeApp\_15.61.100.0\_x86\_\_kzf8qxf38zg5c"**  
**timeout 5**  
**powershell Remove-AppxPackage -Package "Microsoft.SkypeApp\_15.63.76.0\_x86\_\_kzf8qxf38zg5c"**  
**SCHTASKS /DELETE /TN “RunOnce” /F**

3. I didn’t care if the .bat file remained in the Scripts folder, so I left it. But I could have created another toolbox to delete the file if I needed to.

You can use this same method to also change HKCU registry changes and anything else that needs to run as a local user instead of SYSTEM.

I hope there is a better way than this hacked together process.

Hope this helps.

Drew

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://community.simple-help.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mike\_D](https://community.simple-help.com/u/Mike_D)\
**Post date:** [September 21, 2020, 7:44pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/12 "2020-09-21T19:44:14Z")

</div>

Sorry for the late reply  
I did manage a full TB with PS, and with Darrell worked on a generic script to remove any MS packages with PS/TB  
It did well in my tests, I’d like more testers if anyone is willing to test/improve on my PS

---

<div class="post-metadata">

**Author:** ![Drew\_Helgeson](https://community.simple-help.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@Drew\_Helgeson](https://community.simple-help.com/u/Drew_Helgeson)\
**Post date:** [September 21, 2020, 9:09pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/13 "2020-09-21T21:09:37Z")

</div>

Yes, please post the MS Package Remove PowerShell scripts you used in the ToolBox. I would appreciate it. I can give feedback on my testing.

---

<div class="post-metadata">

**Author:** ![Darrell\_Swafford](https://community.simple-help.com/user_avatar/community.simple-help.com/darrell_swafford/32/82_2.png) [@Darrell\_Swafford](https://community.simple-help.com/u/Darrell_Swafford)\
**Post date:** [October 12, 2020, 6:42pm UTC](https://community.simple-help.com/t/skype-uninstall-with-powershell/536/14 "2020-10-12T18:42:24Z")

</div>

PDQ just did a webcast on this:

[![](https://community.simple-help.com/uploads/default/original/1X/008f8af0237a1e5425192b5f388413393750b4f0.jpeg "🔴Uninstalling Package and Non Package Library Applications") ](https://www.youtube.com/watch?v=rDI7E5iFMwE)

Either of these scripts should work I believe. Just modify them to look for your software.  
If someone would like to make these into a toolbox and use the simplehelp scripting api to popup a tech toolbox so they can enter the name of the software to remove so it wasn’t hard coded in the script, that would be cool.

> <https://github.com/pdqcom/Bonus-Content/tree/6cb7264b45dc6dca909b513e943ee977834d0ecc/Uninstall-Software>
>
> //github.com/pdqcom/Bonus-Content/tree/6cb7264b45dc6dca909b513e943ee977834d0ecc/Uninstall-Software

> <https://github.com/pdqcom/Bonus-Content/blob/master/Appx/UninstallAppxPackages.ps1>
