-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xADDomainController: Add RODC Creation Support (#406)
- Changes to xAdDomainController - Add support for creating Read-Only Domain Controller (RODC) (issue #40). - Refactored unit tests for Test-TargetResource.
- Loading branch information
Showing
10 changed files
with
1,200 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
315 changes: 298 additions & 17 deletions
315
DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
Examples/Resources/xADDomainController/4-AddReadOnlyDomainController_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0.0 | ||
.GUID ba30df50-0873-4c2c-872b-96f5c825910d | ||
.AUTHOR Microsoft Corporation | ||
.COMPANYNAME Microsoft Corporation | ||
.COPYRIGHT (c) Microsoft Corporation. All rights reserved. | ||
.TAGS DSCConfiguration | ||
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE | ||
.PROJECTURI https://github.com/PowerShell/xActiveDirectory | ||
.ICONURI | ||
.EXTERNALMODULEDEPENDENCIES | ||
.REQUIREDSCRIPTS | ||
.EXTERNALSCRIPTDEPENDENCIES | ||
.RELEASENOTES First version. | ||
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core | ||
#> | ||
|
||
#Requires -module xActiveDirectory | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will add a read-only domain controller to the domain contoso.com | ||
and specify a list of account, whose passwords are allowed/denied for synchronisation. | ||
#> | ||
Configuration AddReadOnlyDomainController_Config | ||
{ | ||
param | ||
( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$DomainAdministratorCredential | ||
) | ||
|
||
Import-DscResource -ModuleName PSDscResources | ||
Import-DscResource -ModuleName xActiveDirectory | ||
|
||
node localhost | ||
{ | ||
WindowsFeature 'InstallADDomainServicesFeature' | ||
{ | ||
Ensure = 'Present' | ||
Name = 'AD-Domain-Services' | ||
} | ||
|
||
WindowsFeature 'RSATADPowerShell' | ||
{ | ||
Ensure = 'Present' | ||
Name = 'RSAT-AD-PowerShell' | ||
|
||
DependsOn = '[WindowsFeature]InstallADDomainServicesFeature' | ||
} | ||
|
||
xWaitForADDomain 'WaitForestAvailability' | ||
{ | ||
DomainName = 'contoso.com' | ||
DomainUserCredential = $DomainAdministratorCredential | ||
RetryCount = 10 | ||
RetryIntervalSec = 120 | ||
|
||
DependsOn = '[WindowsFeature]RSATADPowerShell' | ||
} | ||
|
||
xADDomainController 'Read-OnlyDomainController(RODC)' | ||
{ | ||
DomainName = 'contoso.com' | ||
DomainAdministratorCredential = $DomainAdministratorCredential | ||
SafemodeAdministratorPassword = $DomainAdministratorCredential | ||
ReadOnlyReplica = $true | ||
SiteName = 'Default-First-Site-Name' | ||
AllowPasswordReplicationAccountName = @('pvdi.test1', 'pvdi.test') | ||
DenyPasswordReplicationAccountName = @('SVC_PVS', 'TA2SCVMM') | ||
|
||
DependsOn = '[xWaitForADDomain]WaitForestAvailability' | ||
} | ||
} | ||
} |
Oops, something went wrong.