Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADDomainController: Add ability to demote DCs with Ensure = Absent #251

Open
devopsjesus opened this issue Mar 25, 2019 · 1 comment · May be fixed by #634
Open

ADDomainController: Add ability to demote DCs with Ensure = Absent #251

devopsjesus opened this issue Mar 25, 2019 · 1 comment · May be fixed by #634
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@devopsjesus
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

Issue #155 had the Ensure property added to the xADDomainController schema as a Read property, since there was no logic to support removing the DC role by setting Ensure to 'Absent'. This issue is a request to add that logic, and enable users to set the Ensure property by tagging it as a Write property.

Verbose logs showing the problem

n/a

Suggested solution to the issue

Add logic blocks to the Test- and Set-TargetResource functions to support removing the DC role from a target node.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

xADDomainController Foo
{
    DomainName = 'contoso.local'
    DomainAdministratorCredential = $Password
    SafemodeAdministratorPassword = $Password
    Ensure = 'Absent'
}

The operating system the target node is running

Supported Windows Server

Version and build of PowerShell the target node is running

5.1+

Version of the DSC module that was used ('dev' if using current dev branch)

2.24

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Mar 26, 2019
@johlju johlju changed the title 'xADDomainController': Add ability to demote DCs with Ensure = Absent xADDomainController: Add ability to demote DCs with Ensure = Absent Mar 26, 2019
@SteveL-MSFT SteveL-MSFT added this to Help Wanted in powershell/dscresources May 14, 2019
@johlju johlju added this to To do in All issues and PR's May 23, 2019
@johlju johlju changed the title xADDomainController: Add ability to demote DCs with Ensure = Absent ADDomainController: Add ability to demote DCs with Ensure = Absent Jul 28, 2019
@johlju
Copy link
Member

johlju commented Aug 25, 2019

For reference, the cmdlet Uninstall-ADDSDomainController to demote a domain controller. I suggest we do not add parameters that ignores prerequisites or forcibly removes a domain controller, we should demote a domain controller the safest way possible with this cmdlet. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
2 participants