Share via


How to remove RSAT from Windows 10 1809

Question

Monday, March 4, 2019 8:21 PM

Hi,

I am writing a PowerShell script that can install or remove RSAT. I am not having problems installing RSAT with PowerShell but I do get an error when trying to remove RSAT. I have tried using Remove-WindowsCapability in a few different ways but it always fails. The most common error is:

Remove-WindowsCapability : Permanent package cannot be uninstalled.

Here are some command lines I have tried:

Get-WindowsCapability -Name RSAT* -Online | Remove-WindowsCapability -Online
Remove-WindowsCapability -Name RSAT* - Online
Remove-WindowsCapability -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 -Online

These all seem to be presenting the error shown above. How do you remove RSAT using PowerShell? These aren't permanent packages so you should be able to remove them.

Thank you!

Rob

All replies (8)

Tuesday, March 5, 2019 4:53 PM ✅Answered

These are my findings. Using:

Remove-WindowsCapability -Online -Name <RSAT_Package_Name>

I can remove these tools in the order given:

Rsat.CertificateServices.Tools0.0.1.0
Rsat.DHCP.Tools
0.0.1.0
Rsat.Dns.Tools0.0.1.0
Rsat.FailoverCluster.Management.Tools
0.0.1.0
Rsat.FileServices.Tools0.0.1.0
Rsat.IPAM.Client.Tools
0.0.1.0
Rsat.LLDP.Tools0.0.1.0
Rsat.NetworkController.Tools
0.0.1.0
Rsat.NetworkLoadBalancing.Tools0.0.1.0
Rsat.RemoteAccess.Management.Tools
0.0.1.0
Rsat.RemoteDesktop.Services.Tools0.0.1.0
Rsat.Shielded.VM.Tools
0.0.1.0
Rsat.StorageMigrationService.Management.Tools0.0.1.0
Rsat.StorageReplica.Tools
0.0.1.0
Rsat.SystemInsights.Management.Tools0.0.1.0
Rsat.VolumeActivation.Tools
0.0.1.0
Rsat.WSUS.Tools0.0.1.0
Rsat.GroupPolicy.Management.Tools
0.0.1.0

I cannot uninstall these (Permanent package cannot be uninstalled):

Rsat.ActiveDirectory.DS-LDS.Tools0.0.1.0
Rsat.BitLocker.Recovery.Tools
0.0.1.0
Rsat.ServerManager.Tools~~~~0.0.1.0

The remainder of the tools that cannot be removed by PowerShell, also cannot be uninstalled manually in the GUI either.

Thank you to everyone that help out on this one!

-Rob


Monday, March 4, 2019 10:20 PM | 1 vote

I think you are running into dependencies that are not allowing you to uninstall RSAT.  

On Windows 10, open the Settings app, go to Manage optional features, select and uninstall the specific RSAT tools you wish to remove. Note that in some cases, you will need to manually uninstall dependencies.

/en-us/windows-server/remote/remote-server-administration-tools#install-uninstall-and-turn-offon-rsat-tools

/Remove-Capability : Removes a capability from an image.

Note: You cannot remove a capability that other packages depend on. For example, if you have the French handwriting and basic capabilities installed, you can't remove the basic capability.

/en-us/windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities#adding-or-removing-features-on-demand

Here is a list of dependencies for RSAT. 

/en-us/windows-hardware/manufacture/desktop/features-on-demand-non-language-fod#fods-that-are-not-preinstalled

Hope this helps and resolves your issue. If this is the case then it might get tougher to remove all the dependencies with PowerShell. 


Monday, March 4, 2019 11:56 PM

I'll work on the dependencies angle. Ultimately, my script will be used in an SCCM application package so the manual steps to remove RSAT are out of scope unless there is no other solution.

I'll try removing these one at a time to see if any of them can be removed and report back my results.


Tuesday, March 5, 2019 2:32 AM | 1 vote

Some Windows updates are installed as permanent so that we cannot remove them via general method, when you wan to use powershell command to remove this type of package, you will see the error message "Permanent Package cannot be uninstalled."

When you want to remove RSAT, it attempted to uninstall one of the dependencies first, so I think you do need to manually remove it.

Regards

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, March 5, 2019 2:57 AM

How to uninstall permanent updates. (Thanks to abbodi1406)

  1. Search for the *.mum file in C:\Windows\servicing\Packages\
  2. Open the .mum file with notepad
  3. Search for permanent
  4. delete àpermanency=”permanent”ß
  5. Then use dism to remove the package

 

Just do it.


Wednesday, June 19, 2019 12:51 PM

Uninstall all the component until Rsat.ActiveDirectory.DS-LDS.Tool is left. Then uninstall Rsat.ServerManager.Tools last. 


Thursday, July 4, 2019 12:24 PM

I have the same problem and I can't uninstall Rsat.ServerManager.Tools. I have the message that "permanent package cannot be uninstalled". I searched in all the mum files and didn't find anything. Can you help me?


Wednesday, August 21, 2019 10:48 PM

I'm having a similar issue.  I can't remove any of the following due to same issue:

Rsat.ActiveDirectory.DS-LDS.Tools0.0.1.0
Rsat.FileServices.Tools
0.0.1.0
Rsat.GroupPolicy.Management.Tools0.0.1.0
Rsat.ServerManager.Tools
0.0.1.0

I'm not sure how you were able to uninstall FileServices but I can't.  Clearly there are some dependencies that are simply not clear.

I looked at the mum files in c:\windows\servicing\packages, and the only ones that have permanence=permanent are all Package_#somenumber#_for_#someKBNumber#.  None of the packages that appear to be related to the RSAT tools (e.g. Microsoft-Windows-ActiveDirectory-DS-LDS-Tools-FoD-Package~31bf3856ad364e35~amd64~~10.0.18362.1.mum) have this permanence set. 

After running the remove-windowscapability cmd with both -verbose and -debug parameters, I noticed my C:\WINDOWS\Logs\DISM\dism.log log, referenced the C:\WINDOWS\logs\cbs\cbs.log so I went digging.

The CBS log seems to suggest the FileServices package is depended on by another package, which is not even installed currently (it was removed successfully prior).  That package is the Microsoft-Windows-FailoverCluster-Management-Tools-FOD-*** package, which I assume is the RSAT.FailoverCluster.Management.Tools~~~~0.0.1.0 feature that I was able to remove earlier.  I don't see any other *failover* FOD.  

2019-08-21 18:26:00, Info                  CBS    Plan: Package Microsoft-Windows-FileServices-Tools-FoD-Package~31bf3856ad364e35~amd64~~10.0.18362.1 declares capability Rsat.FileServices.Tools~~~~0.0.1.0 and it is still required by package: Microsoft-Windows-FailoverCluster-Management-Tools-FOD-Package~31bf3856ad364e35~amd64~~10.0.18362.1, cannot remove. [HRESULT = 0x800f0825 - CBS_E_CANNOT_UNINSTALL]
2019-08-21 18:26:00, Info                  CBS    Failed to validate capability removal [HRESULT = 0x800f0825 - CBS_E_CANNOT_UNINSTALL]
2019-08-21 18:26:00, Info                  CBS    Failed to validate the plan. [HRESULT = 0x800f0825 - CBS_E_CANNOT_UNINSTALL]
2019-08-21 18:26:00, Info                  CBS    Failed to plan execution. [HRESULT = 0x800f0825 - CBS_E_CANNOT_UNINSTALL]
2019-08-21 18:26:00, Error                 CBS    Failed to process single phase execution. [HRESULT = 0x800f0825 - CBS_E_CANNOT_UNINSTALL]
PS C:\WINDOWS\system32> Get-WindowsCapability -name *fail* -online |select name,state

Name                                                  State
                                                  
Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0 NotPresent