Remve AD DS using the Remve Rles Wizard in Server Manager The fllwing prcedure shws the steps t remve AD DS using the Remve Rles Wizard in Server Manager. Administrative credentials T remve a dmain cntrller, yu must be a member f the Dmain Admins grup in the dmain. T remve the last dmain cntrller in a dmain r frest, yu must be a member f the Enterprise Admins grup. If yu frce the remval f AD DS while the dmain cntrller is started in Directry Services Restre Mde (DSRM), credentials are ptinal. T Remve AD DS using the Remve Rles Wizard 1. In Server Manager, click Manage, and then click Remve Rles and Features. 2. On the Befre yu begin page, review the infrmatin and then click Next. 3. On the Select destinatin server page, click the name f the server that yu want t remve AD DS frm and then click Next. 4. On the Remve server rles page, clear the check bx fr Active Directry Dmain Services and any ther server rles that yu want t remve, such as DNS Server, and then n the Remve Rles and Features Wizard dialg bx, click Remve Features, and then click Next. 5. The Remve Rles and Features Wizard returns the fllwing validatin errr: 1
The validatin errr appears by design because the AD DS server rle binaries cannt be remved while the server is running as a dmain cntrller. Click Demte this dmain cntrller. 6. On the Credentials page, specify credentials t remve AD DS. If previus attempts t remve AD DS n this dmain cntrller have failed, then yu can select the Frce the remval f this dmain cntrller check bx. If yu are remving the last dmain cntrller in the dmain, click Last dmain cntrller in the dmain check bx. Click Next. 7. On the Warnings page, review the infrmatin abut the rles hsted by the dmain cntrller, click Prceed with remval, and then click Next. 8. On the Remval Optins page: This page des nt appear if yu chse Frce the remval f this dmain cntrller. If yu plan t reinstall the dmain cntrller using the same dmain cntrller accunt, click Retain the dmain cntrller metadata. In additin, if either f the fllwing tw ptins appears, it must be selected befre yu can prceed. If yu are remving the last DNS server that hsts the znes hsted n this dmain cntrller, click Remve this DNS zne (this is the last server that hsts the zne). 2
Imprtant This ptin will be shwn nly if the dmain cntrller is the last DNS server fr the zne. If yu want t delete the applicatin partitins, click Remve applicatin partitins. Click Next. 9. On the New Administratr Passwrd page, type and cnfirm the passwrd fr the lcal Administratr accunt fr the server, and then click Next. 10. On the Review Optins page, click Demte. The server will restart autmatically t cmplete the dmain cntrller demtin. Cntinue with the next steps, which are needed t fully remve the AD DS server rle binaries after the machine restarts t cmplete the demtin. 11. In Server Manager, click Manage, and then click Remve Rles and Features. 12. On the Befre yu begin page, review the infrmatin and then click Next. 13. On the Select destinatin server page, click the name f the server that yu want t remve AD DS frm and then click Next. 14. On the Remve server rles page, clear the check bx fr Active Directry Dmain Services and any ther server rles that yu want t remve, such as DNS Server. On the Remve Rles and Features Wizard dialg bx, clear the Remve management tls (if applicable) check bx if yu plan t administer anther dmain cntrller frm this server, and click Remve Features, and then click Next. 15. On the Remve features page, clear the check bx fr any feature yu want t remve and then click Next. 16. On the Cnfirm remval selectins page, click Remve. 17. After the rle is remved, click Clse, and restart the server. Remve AD DS using Windws PwerShell directry partitin, cannt be retained if yu remve AD DS. Remve AD DS using Windws PwerShell Windws PwerShell allws yu t script the remval f AD DS. If yu plan t demte a dmain cntrller temprarily, yu d nt need t remve and then reinstall the AD DS server rle. T view the syntax and parameter ptins fr remving AD DS using the ADDSDeplyment mdule in Windws PwerShell, type the fllwing cmmand: 3
get-help Uninstall-ADDSDmainCntrller The cmmand syntax fr remving AD DS is as fllws. Optinal parameters appear within brackets. Uninstall-ADDSDmainCntrller [-skipprechecks] LcalAdministratrPasswrd <SecureString> [-Credential <PS Credential>] [-DemteOperatinsMasterRle] [- DNSDelegatinRemvalCredential <PS Credential>] [-FrceRemval] [- IgnreLastDCInDmainMismatch] [-IgnreLastDNSServerFrZne] [- LastDmainCntrllerInDmain] [-NRebtOnCmpletin] [- RemveApplicatinPartitins] [-RemveDNSDelegatin] [-RetainDCMetadata] [- Frce] [-WhatIf] [-Cnfirm] [<cmmn parameters>] Uninstall-ADDSDmainCntrller FrceRemval [-skipprechecks] LcalAdministratrPasswrd <SecureString> [-Credential <PS Credential>] [- DemteOperatinsMasterRle] [-NRebtOnCmpletin] [-Frce] [-WhatIf] [- Cnfirm] [<cmmn parameters>] Tip Nrmally n demtin, any warnings with high imprtance will require explicit acknwledgment f the user. T ensure that thse warnings d nt wait fr user acknwledgment, specify frce ptin. The UI always passes the Frce flag. The Frceremval ptin is typically used t remve AD DS when the dmain cntrller has n cnnectivity with ther dmain cntrllers. Fr example, t remve AD DS frm an additinal dmain cntrller in a dmain and be prmpted t set the lcal Administratr passwrd, type the fllwing cmmand: Yu will be prmpted t supply the lcal Administratr passwrd. Uninstall-ADDSDmainCntrller T remve AD DS frm an additinal dmain cntrller in a dmain and be prmpted t set the lcal Administratr passwrd but nt prmpted t cnfirm the cmmand, type the fllwing cmmand: Uninstall-ADDSDmainCntrller -cnfirm:$false Here is an example f frcibly demting with its minimal required arguments f -frceremval and -demteperatinmasterrle. The -credential argument is nt required because the user lgged n as a member f the Enterprise Admins grup: 4
Here is an example f remving the last dmain cntrller in the dmain with its minimal required arguments f -lastdmaincntrllerindmain and remveapplicatinpartitins: 5