Link to home
Start Free TrialLog in
Avatar of jnordeng
jnordeng

asked on

Cannot Remove RDS Services from Windows 2016 via GUI or Powershell - It's like a virus, won't leave

Hello.  I'm setting up a new environment and RDS service got installed on a Windows 2016 server.  They need to be removed however; this is not working.  I've tried to remove from the GUI on the server, I've also tried via powershell to remove each feature under the Role and the role itself.  In Powershell, each feature and role service was removed 'successfully' and the system requires a reboot.  So reboot - then I see that RDS fails agian to find the license server and all the RDS components are still installed.

How do I get rid of RDS for good on this box?

Thanks in advace.
Avatar of Brian B
Brian B
Flag of Canada image

Just to be sure, you are using this command?
Uninstall-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -confirm

Is there any indication of success/failure in the event logs?

I ran into something like this before and I think the proble was something else was dependant on RDS, so Windows was automatically putting it back. I'll see if I can find more about that unless another Expert beats me to it.
Avatar of jnordeng
jnordeng

ASKER

Thanks Brian, appreciate your help and see if I can provide more info from the logs with the commands you've provided,  I'll give it a try again.  Awe, a dependency, that seems like it would make sense though I am not sure what that is either.
Ok I ran your command, Uninstall-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -confirm.  Attached Image shows the system acknowledges this.  I looked in event viewer and had a few different entries acknowledging this such as:

Reboot is necessary before the selectable update RSAT of package Microsoft-Windows-Server-Gui-Mgmt-Package can be turned off.
Reboot is necessary before the selectable update ServerManager-Core-RSAT-Role-Tools of package ServerManager-Core-Package can be turned off.


After Reboot, (attached image) you can see the system couldn't un-install and rolled back.

In the event viewer after reboot, There is still nothing in the 'Apps' Event log, in the 'Setup' Event log:

Update WebAccess of package WebAccessRole failed to be turned off.  Status 0x80070490
Update Remote-Desktop-Services of package RemoteDesktopServicesRole failed to be turned off.  Status:  0x80070490
Update Licensing-Diagnosis-UI of package LicensingDiagnosisUI failed to be turned off.  Status 0x80070490
Update RSAT-RDS-Tools-Feature of package TerminalServices-RsatRoot failed to be turned off.  Status 0x80070490
Update Servermanager-Core-RSAT-Role-Tools of package ServerManager-Core-Package failed to be turned off.  Status: 0x80070490.

Thanks
RemoteDesktopServicesRemoval1.png
RemoteDesktopServicesRemoval_AfterRe.png
It seems to be just this server, ran the same command you provided on another and came off right away.  I'll try patching and then try removing, perhaps there is an issue with an underlying service or something.
Well, thinking patching to fix this so I could install worked opposite.  I have attached the screen shot but it is telling me the same error and a failure that it was noting in the Event logs now in the PowerShell Window.  :(
RDSUninstallFailure.png
I read somewhere to remove IIS components and this would allow the RDS components to uninstall.  There was also a recommendation to clear the contents of c:\windows\temp as well.  I've performed both of these but the IIS removal provided the same thing.  From the Powershell window said was successful but needed a reboot.  After all the components were removed, rebooted and then on startup, said it couldn't make the changes and rolled back.  

So, kind of at a loss as to why I can't remove Roles/Features on this system.
Any results?
Get-RDSessionDeployment
Get-RDRemoteApp

Open in new window

This should do it:
Remove-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -IncludeAllSubfeature -confirm:$False

Open in new window

I'm not 100% sure the -Force switch can be used here.
Thanks for your response.  So, some of the feature set has actually been removed.  If i put in the commands you suggested, Get-RDSessionDeployment and Get-RDRemoteApp I get an error saying not found.

So, put in Get-WindowsFeature Under Remove Desktop Services, Remove Desktop Web Access is now the only one checked.  So tried to remove that, but it is failing.

Any idea if there is a dependency or why this system is so stubborn?

Thanks
What do the Event Logs say?
Trying to remove the Web Component, I am getting a Windows Error Reporting, Fault bucket typv 5.  Event Name is CbsPackageServicingFailure2.
Interesting, what prompted me to remove RDS services was the fact it was not needed on this system (yet anyway) and it wasn't allowing me to RDP.  However since it removed the other components from trying through numerous attempts, I am not able to RDP to this server.  Very confused by windows at this point.  Regardless, thank you for your assistance.
ASKER CERTIFIED SOLUTION
Avatar of joinaunion
joinaunion
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial