Unable to remove the ADDS from the DC using PowerShell command

Anant Bera 231 Reputation points
2024-01-31T19:43:50.8866667+00:00

Hello experts We are trying to run a PowerShell script that will remove the ADDS and DNS from the domain controller and we have tried Uninstall-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools Also, we have tried Remove-WindowsFeature Still, we are getting the below error in a loop WARNING: The plug-in for "Active Directory Domain Services" is taking more time to load than expected. We can remove the feature by GUI but not from Powershell

Windows for business Windows Server User experience PowerShell
Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2024-01-31T19:59:26.02+00:00

    Hi To demote a domain controller through powershell you have to run the following command:

    Uninstall-ADDSDomainController
    

    for more information please refer to the following link: https://learn.microsoft.com/en-us/powershell/module/addsdeployment/uninstall-addsdomaincontroller?view=windowsserver2022-ps Please don’t forget to accept helpful answer


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.