dsccommunity / ActiveDirectoryDsc

This module contains DSC resources for deployment and configuration of Active Directory Domain Services.
MIT License
336 stars 140 forks source link

ADDomainController: Support for supplying DelegatedAdministratorAccountName #709

Closed Borgquite closed 4 months ago

Borgquite commented 4 months ago

Pull Request (PR) description

When setting up a read-only domain controller, it is possible to supply a user or group which will gain local administrative privileges to the RODC. The specified user or members of the specified group can perform operations on the RODC with privileges equivalent to the computer's Administrators group. They aren't members of the Domain Admins or domain built-in Administrators groups.

https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/rodc/install-a-windows-server-2012-active-directory-read-only-domain-controller--rodc---level-200-#delegation-of-rodc-installation-and-administration

This can be selected during initial setup via the DelegatedAdministratorAccountName parameter, but also updated later using the ManagedBy attribute on the computer account in Active Directory. This pull request adds support for configuring this via PowerShell DSC using the ADDomainController resource.

https://devblogs.microsoft.com/scripting/weekend-scripter-use-powershell-to-delegate-administrator-of-rodcs/

This Pull Request (PR) fixes the following issues

None

Task list


This change is Reviewable

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98%. Comparing base (bdde66f) to head (7b33fc0). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/709/graphs/tree.svg?width=650&height=150&src=pr&token=p3P3tBCItu&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #709 +/- ## =================================== Coverage 98% 98% =================================== Files 25 25 Lines 3475 3512 +37 =================================== + Hits 3406 3443 +37 Misses 69 69 ``` | [Files](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/709?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [...FT\_ADDomainController/MSFT\_ADDomainController.psm1](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/709?src=pr&el=tree&filepath=source%2FDSCResources%2FMSFT_ADDomainController%2FMSFT_ADDomainController.psm1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL0RTQ1Jlc291cmNlcy9NU0ZUX0FERG9tYWluQ29udHJvbGxlci9NU0ZUX0FERG9tYWluQ29udHJvbGxlci5wc20x) | `100% <100%> (ø)` | |
Borgquite commented 4 months ago

@johlju I hope this is all good to go now!

johlju commented 4 months ago

Will get back to as soon as I have time. It's on the todo list. 🙂

Borgquite commented 4 months ago

Hey @johlju, wondering if you're able to carve out some time for this yet? Appreciate how busy things can be! :)

Borgquite commented 4 months ago

@johlju Sorry to pester you as appreciate you've got a lot on - keen to try this in production :) Let me know if you have any time!

johlju commented 4 months ago

It is on my todo list, I haven't been able to carve out enough free time to do it yet. Will do as soon as possible.

If another community member have time to review then go for it. Then I can merge it too. 😊

johlju commented 4 months ago

@Borgquite one comment then I think this is ready to merge.