From ce57669eab1d83b40adc06d0a5c752f26251591c Mon Sep 17 00:00:00 2001 From: thequietman44 <39066905+thequietman44@users.noreply.github.com> Date: Wed, 13 Jun 2018 15:20:11 -0400 Subject: [PATCH] Remove duplicate example in README.md and fix xADUser schema version (#206) - Changes to xActiveDirectory - Changed MSFT_xADUser.schema.mof version to "1.0.0.0" to match other resources (issue #190). - Removed duplicated code from examples in README.md (issue #198). --- .../MSFT_xADUser/MSFT_xADUser.schema.mof | 2 +- README.md | 128 +----------------- 2 files changed, 3 insertions(+), 127 deletions(-) diff --git a/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof b/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof index c0ad1d63e..cdf3319fd 100644 --- a/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof +++ b/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof @@ -1,4 +1,4 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xADUser")] +[ClassVersion("1.0.0.0"), FriendlyName("xADUser")] class MSFT_xADUser : OMI_BaseResource { [Key, Description("Name of the domain where the user account is located (only used if password is managed)")] String DomainName; diff --git a/README.md b/README.md index 4d6d002aa..8e5c2608f 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,8 @@ The xADServicePrincipalName DSC resource will manage service principal names. ### 2.19.0.0 * Changes to xActiveDirectory + * Changed MSFT_xADUser.schema.mof version to "1.0.0.0" to match other resources ([issue #190](https://github.com/PowerShell/xActiveDirectory/issues/190). [thequietman44 (@thequietman44)](https://github.com/thequietman44) + * Removed duplicated code from examples in README.md ([issue #198](https://github.com/PowerShell/xActiveDirectory/issues/198). [thequietman44 (@thequietman44)](https://github.com/thequietman44) * Activated the GitHub App Stale on the GitHub repository. * The resources are now in alphabetical order in the README.md ([issue #194](https://github.com/PowerShell/xActiveDirectory/issues/194)). @@ -728,132 +730,6 @@ Sample_xADDomainTrust_OneWayTrust -configurationdata $config ` -TargetDomain corporate.contoso.com ` -TargetDomainAdminCred (get-credential) ` -TrustDirection 'Inbound' -# Configuration to Setup Parent Child Domains -``` - -```powershell -configuration AssertParentChildDomains -{ - param - ( - [Parameter(Mandatory)] - [pscredential]$safemodeAdministratorCred, - - [Parameter(Mandatory)] - [pscredential]$domainCred, - - [Parameter(Mandatory)] - [pscredential]$DNSDelegationCred, - - [Parameter(Mandatory)] - [pscredential]$NewADUserCred - ) - - Import-DscResource -ModuleName xActiveDirectory - - Node $AllNodes.Where{$_.Role -eq "Parent DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xADDomain FirstDS - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domainCred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DnsDelegationCredential = $DNSDelegationCred - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.DomainName - DomainUserCredential = $domainCred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[xADDomain]FirstDS" - } - - xADUser FirstUser - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - UserName = "dummy" - Password = $NewADUserCred - Ensure = "Present" - DependsOn = "[xWaitForADDomain]DscForestWait" - } - - } - - Node $AllNodes.Where{$_.Role -eq "Child DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.ParentDomainName - DomainUserCredential = $domainCred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xADDomain ChildDS - { - DomainName = $Node.DomainName - ParentDomainName = $Node.ParentDomainName - DomainAdministratorCredential = $domainCred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DependsOn = "[xWaitForADDomain]DscForestWait" - } - } -} - -$ConfigData = @{ - - AllNodes = @( - @{ - Nodename = "dsc-testNode1" - Role = "Parent DC" - DomainName = "dsc-test.contoso.com" - CertificateFile = "C:\publicKeys\targetNode.cer" - Thumbprint = "AC23EA3A9E291A75757A556D0B71CBBF8C4F6FD8" - RetryCount = 50 - RetryIntervalSec = 30 - }, - - @{ - Nodename = "dsc-testNode2" - Role = "Child DC" - DomainName = "dsc-child" - ParentDomainName = "dsc-test.contoso.com" - CertificateFile = "C:\publicKeys\targetNode.cer" - Thumbprint = "AC23EA3A9E291A75757A556D0B71CBBF8C4F6FD8" - RetryCount = 50 - RetryIntervalSec = 30 - } - ) -} - -AssertParentChildDomains -configurationData $ConfigData ` --safemodeAdministratorCred (Get-Credential -Message "New Domain Safe Mode Admin Credentials") ` --domainCred (Get-Credential -Message "New Domain Admin Credentials") ` --DNSDelegationCred (Get-Credential -Message "Credentials to Setup DNS Delegation") ` --NewADUserCred (Get-Credential -Message "New AD User Credentials") - - -Start-DscConfiguration -Wait -Force -Verbose -ComputerName "dsc-testNode1" -Path $PSScriptRoot\AssertParentChildDomains ` --Credential (Get-Credential -Message "Local Admin Credentials on Remote Machine") -Start-DscConfiguration -Wait -Force -Verbose -ComputerName "dsc-testNode2" -Path $PSScriptRoot\AssertParentChildDomains ` --Credential (Get-Credential -Message "Local Admin Credentials on Remote Machine") ``` ### Enable the Active Directory Recycle Bin