Skip to content

Commit

Permalink
xActiveDirectory: OptIn to the "Common Tests - Validate Example Files…
Browse files Browse the repository at this point in the history
… To Be Published" (#364)

- Changes to xActiveDirectory
  - Opt-in to the following DSC Resource Common Meta Tests:
    - Common Tests - Validate Example Files To Be Published (issue #311)
  • Loading branch information
X-Guardian authored and johlju committed Jun 12, 2019
1 parent 0ee8c74 commit aa801e9
Show file tree
Hide file tree
Showing 55 changed files with 1,038 additions and 456 deletions.
3 changes: 2 additions & 1 deletion .MetaTestOptIn.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"Common Tests - Required Script Analyzer Rules",
"Common Tests - Flagged Script Analyzer Rules",
"Common Tests - Validate Localization",
"Common Tests - Validate Example Files"
"Common Tests - Validate Example Files",
"Common Tests - Validate Example Files To Be Published"
]
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Common Tests - Validate Markdown Links ([Issue #280](https://github.com/PowerShell/xActiveDirectory/issues/280))
- Common Tests - Validate Localization ([Issue #281](https://github.com/PowerShell/xActiveDirectory/issues/281))
- Common Tests - Validate Example Files ([Issue #279](https://github.com/PowerShell/xActiveDirectory/issues/279))
- Common Tests - Validate Example Files To Be Published ([Issue #311](https://github.com/PowerShell/xActiveDirectory/issues/311))
- Move resource descriptions to Wiki using auto-documentation ([Issue #289](https://github.com/PowerShell/xActiveDirectory/issues/289))
- Move helper functions from MSFT_xADCommon to the module
xActiveDirectory.Common ([issue #288](https://github.com/PowerShell/xActiveDirectory/issues/288))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
This configuration will create two Active Directory computer accounts
enabled. The property Enabled will not be enforced in either case.
#>

Configuration AddComputerAccount_Config
{
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
This configuration will create an Active Directory computer account
disabled. The property Enabled will not be enforced.
#>

Configuration AddComputerAccountDisabled_Config
{
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
on the specified domain controller and in the specific organizational
unit.
#>

Configuration AddComputerAccountSpecificPath_Config
{
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
unit. After the account is create an Offline Domain Join Request file
is created to the specified path.
#>

Configuration AddComputerAccountAndCreateODJRequest_Config
{
param
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
<#PSScriptInfo
.VERSION 1.0
.GUID 86c0280c-6b48-4689-815d-5bc0692845a4
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.EXAMPLE
This example will create a new domain with a new forest and a forest functional level of Server 2016
.DESCRIPTION
This configuration will create a new domain with a new forest and a forest
functional level of Server 2016.
#>
$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'localhost'
FFL = 'WinThreshold'
DomainName = 'contoso.com'
}
)
}

configuration NewForest
Configuration NewForest_Config
{
param
(
Expand Down Expand Up @@ -47,3 +58,13 @@ configuration NewForest
}
}
}

$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'localhost'
FFL = 'WinThreshold'
DomainName = 'contoso.com'
}
)
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<#PSScriptInfo
.VERSION 1.0
.GUID 40a01066-4c01-4115-b7a8-c21b51ac4ed3
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.EXAMPLE
This example will create a new child domain in an existing forest with a Domain Functional Level of Windows Server 2012R2
.DESCRIPTION
This configuration will create a new child domain in an existing forest with
a Domain Functional Level of Windows Server 2012R2.
#>
$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'localhost'
DFL = 'Win2012R2'
DomainName = 'child'
ParentDomain = 'contoso.com'
}
)
}

configuration NewChildDomain
Configuration NewChildDomain_Config
{
param
(
Expand Down Expand Up @@ -49,3 +59,14 @@ configuration NewChildDomain
}
}
}

$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'localhost'
DFL = 'Win2012R2'
DomainName = 'child'
ParentDomain = 'contoso.com'
}
)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
<#PSScriptInfo
.VERSION 1.0
.GUID aad067ec-0e7a-4a41-874d-432a3ff73437
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.EXAMPLE
In this example, we create a domain, and then create a child domain on another node.
.DESCRIPTION
This configuration will create a domain, and then create a child domain on
another node.
#>
Configuration NewForestwithParentAndChildDomain

Configuration NewForestwithParentAndChildDomain_Config
{
param
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
<#PSScriptInfo
.VERSION 1.0
.GUID 400370df-41bc-44d4-8730-0aa9a135383f
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.EXAMPLE
In the following example configuration, a highly available domain is created by adding a second domain controller to the newly created domain.
This example uses the xWaitForDomain resource to ensure that the domain is present before the second domain controller is added.
.DESCRIPTION
This configuration will create a highly available domain by adding
a second domain controller to the newly created domain.
The xWaitForDomain resource is used to ensure that the domain is
present before the second domain controller is added.
#>
Configuration NewDomainWithTwoDCs

Configuration NewDomainWithTwoDCs_Config
{
param
(
Expand Down Expand Up @@ -74,6 +96,7 @@ Configuration NewDomainWithTwoDCs
}
}
}

# Configuration Data for AD
$ConfigurationData = @{
AllNodes = @(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
This configuration will add a domain controller to the domain
contoso.com.
#>
Configuration AddDomainControllerToDomainMinimal

Configuration AddDomainControllerToDomainMinimal_Config
{
param
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
This configuration will add a domain controller to the domain
contoso.com, specifying all properties of the resource.
#>
Configuration AddDomainControllerToDomainAllProperties

Configuration AddDomainControllerToDomainAllProperties_Config
{
param
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
This configuration will add a domain controller to the domain
contoso.com using the information from media.
#>
Configuration AddDomainControllerToDomainUsingIFM

Configuration AddDomainControllerToDomainUsingIFM_Config
{
param
(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<#PSScriptInfo
.VERSION 1.0
.GUID 96b94fc3-2b96-47b7-82e8-d0551ec2e738
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.DESCRIPTION
This configuration will set an Active Directory domain's default password
policy to set the minimum password length and complexity.
#>

Configuration ConfigureDefaultPasswordPolicy_Config
{
Param
(
[parameter(Mandatory = $true)]
[System.String]
$DomainName,

[parameter(Mandatory = $true)]
[System.Boolean]
$ComplexityEnabled,

[parameter(Mandatory = $true)]
[System.Int32]
$MinPasswordLength
)

Import-DscResource -Module xActiveDirectory

Node $AllNodes.NodeName
{
xADDomainDefaultPasswordPolicy 'DefaultPasswordPolicy'
{
DomainName = $DomainName
ComplexityEnabled = $ComplexityEnabled
MinPasswordLength = $MinPasswordLength
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
<#PSScriptInfo
.VERSION 1.0
.GUID 2caf2b93-d87e-426d-8c44-9f1d0452be10
.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
.PRIVATEDATA
#>

#Requires -module xActiveDirectory

<#
.EXAMPLE
This example will create a new one way inbound trust between two domains.
.DESCRIPTION
This configuration will create a new one way inbound trust between two
domains.
#>

Configuration NewOneWayTrust
Configuration NewOneWayTrust_Config
{
param
(
Expand Down

0 comments on commit aa801e9

Please sign in to comment.