diff --git a/.MetaTestOptIn.json b/.MetaTestOptIn.json index a69afdb8b..21026745a 100644 --- a/.MetaTestOptIn.json +++ b/.MetaTestOptIn.json @@ -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" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b490e8cf..6fd45f1f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1 b/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1 index 378f89b5b..a66f7eb67 100644 --- a/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1 +++ b/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1 @@ -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 diff --git a/Examples/Resources/xADComputer/2-AddComputerAccountDisabled_Config.ps1 b/Examples/Resources/xADComputer/2-AddComputerAccountDisabled_Config.ps1 index ec8d181a5..72e4b8cbe 100644 --- a/Examples/Resources/xADComputer/2-AddComputerAccountDisabled_Config.ps1 +++ b/Examples/Resources/xADComputer/2-AddComputerAccountDisabled_Config.ps1 @@ -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 diff --git a/Examples/Resources/xADComputer/3-AddComputerAccountSpecificPath_Config.ps1 b/Examples/Resources/xADComputer/3-AddComputerAccountSpecificPath_Config.ps1 index 369ec2984..e94cc687f 100644 --- a/Examples/Resources/xADComputer/3-AddComputerAccountSpecificPath_Config.ps1 +++ b/Examples/Resources/xADComputer/3-AddComputerAccountSpecificPath_Config.ps1 @@ -23,6 +23,7 @@ on the specified domain controller and in the specific organizational unit. #> + Configuration AddComputerAccountSpecificPath_Config { param diff --git a/Examples/Resources/xADComputer/4-AddComputerAccountAndCreateODJRequest_Config.ps1 b/Examples/Resources/xADComputer/4-AddComputerAccountAndCreateODJRequest_Config.ps1 index 2fd2a6f6c..7040c61f8 100644 --- a/Examples/Resources/xADComputer/4-AddComputerAccountAndCreateODJRequest_Config.ps1 +++ b/Examples/Resources/xADComputer/4-AddComputerAccountAndCreateODJRequest_Config.ps1 @@ -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 diff --git a/Examples/Resources/xADDomain/1-NewForest.ps1 b/Examples/Resources/xADDomain/1-NewForest_Config.ps1 similarity index 61% rename from Examples/Resources/xADDomain/1-NewForest.ps1 rename to Examples/Resources/xADDomain/1-NewForest_Config.ps1 index 853d1cfc3..3d8c496ee 100644 --- a/Examples/Resources/xADDomain/1-NewForest.ps1 +++ b/Examples/Resources/xADDomain/1-NewForest_Config.ps1 @@ -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 ( @@ -47,3 +58,13 @@ configuration NewForest } } } + +$ConfigurationData = @{ + AllNodes = @( + @{ + NodeName = 'localhost' + FFL = 'WinThreshold' + DomainName = 'contoso.com' + } + ) +} diff --git a/Examples/Resources/xADDomain/2-NewChildDomain.ps1 b/Examples/Resources/xADDomain/2-NewChildDomain_Config.ps1 similarity index 62% rename from Examples/Resources/xADDomain/2-NewChildDomain.ps1 rename to Examples/Resources/xADDomain/2-NewChildDomain_Config.ps1 index 8ddb8e7d5..bff93fad6 100644 --- a/Examples/Resources/xADDomain/2-NewChildDomain.ps1 +++ b/Examples/Resources/xADDomain/2-NewChildDomain_Config.ps1 @@ -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 ( @@ -49,3 +59,14 @@ configuration NewChildDomain } } } + +$ConfigurationData = @{ + AllNodes = @( + @{ + NodeName = 'localhost' + DFL = 'Win2012R2' + DomainName = 'child' + ParentDomain = 'contoso.com' + } + ) +} diff --git a/Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain.ps1 b/Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain_Config.ps1 similarity index 83% rename from Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain.ps1 rename to Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain_Config.ps1 index 66a950774..8eb0a18bb 100644 --- a/Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain.ps1 +++ b/Examples/Resources/xADDomain/3-NewForestwithParentAndChildDomain_Config.ps1 @@ -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 ( diff --git a/Examples/Resources/xADDomain/4-NewDomainWithTwoDCs.ps1 b/Examples/Resources/xADDomain/4-NewDomainWithTwoDCs_Config.ps1 similarity index 79% rename from Examples/Resources/xADDomain/4-NewDomainWithTwoDCs.ps1 rename to Examples/Resources/xADDomain/4-NewDomainWithTwoDCs_Config.ps1 index 8bd0dc2f1..3f1222f92 100644 --- a/Examples/Resources/xADDomain/4-NewDomainWithTwoDCs.ps1 +++ b/Examples/Resources/xADDomain/4-NewDomainWithTwoDCs_Config.ps1 @@ -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 ( @@ -74,6 +96,7 @@ Configuration NewDomainWithTwoDCs } } } + # Configuration Data for AD $ConfigurationData = @{ AllNodes = @( diff --git a/Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal.ps1 b/Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal_Config.ps1 similarity index 97% rename from Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal.ps1 rename to Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal_Config.ps1 index 5453dc025..6db30d42f 100644 --- a/Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal.ps1 +++ b/Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal_Config.ps1 @@ -22,7 +22,8 @@ This configuration will add a domain controller to the domain contoso.com. #> -Configuration AddDomainControllerToDomainMinimal + +Configuration AddDomainControllerToDomainMinimal_Config { param ( diff --git a/Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties.ps1 b/Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties_Config.ps1 similarity index 97% rename from Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties.ps1 rename to Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties_Config.ps1 index 573c1a119..242742d3d 100644 --- a/Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties.ps1 +++ b/Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties_Config.ps1 @@ -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 ( diff --git a/Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM.ps1 b/Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM_Config.ps1 similarity index 97% rename from Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM.ps1 rename to Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM_Config.ps1 index 9e6dc8402..1e4b91fac 100644 --- a/Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM.ps1 +++ b/Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM_Config.ps1 @@ -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 ( diff --git a/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy.ps1 b/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy.ps1 deleted file mode 100644 index dc8e221ce..000000000 --- a/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -<# - .EXAMPLE - In this example, we configure an Active Directory domain's default password policy to set the minimum password length and complexity. -#> -configuration ConfigureDefaultPasswordPolicy -{ - 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 - } - } -} diff --git a/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy_Config.ps1 b/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy_Config.ps1 new file mode 100644 index 000000000..ec24670c8 --- /dev/null +++ b/Examples/Resources/xADDomainDefaultPasswordPolicy/1-ConfigureDefaultPasswordPolicy_Config.ps1 @@ -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 + } + } +} diff --git a/Examples/Resources/xADDomainTrust/1-NewOneWayTrust.ps1 b/Examples/Resources/xADDomainTrust/1-NewOneWayTrust_Config.ps1 similarity index 53% rename from Examples/Resources/xADDomainTrust/1-NewOneWayTrust.ps1 rename to Examples/Resources/xADDomainTrust/1-NewOneWayTrust_Config.ps1 index 54a1e7c41..750affabc 100644 --- a/Examples/Resources/xADDomainTrust/1-NewOneWayTrust.ps1 +++ b/Examples/Resources/xADDomainTrust/1-NewOneWayTrust_Config.ps1 @@ -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 ( diff --git a/Examples/Resources/xADForestProperties/1-ReplaceForestProperties.ps1 b/Examples/Resources/xADForestProperties/1-ReplaceForestProperties_Config.ps1 similarity index 55% rename from Examples/Resources/xADForestProperties/1-ReplaceForestProperties.ps1 rename to Examples/Resources/xADForestProperties/1-ReplaceForestProperties_Config.ps1 index d5d41781f..7c19228b8 100644 --- a/Examples/Resources/xADForestProperties/1-ReplaceForestProperties.ps1 +++ b/Examples/Resources/xADForestProperties/1-ReplaceForestProperties_Config.ps1 @@ -1,9 +1,30 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 4ac2de06-ee10-4f15-9ed8-a87d21b48766 +.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 manages the Service and User Principal name suffixes in the Consto.com - forest by replacing any existing suffixes with the ones specified in the configuration. + .DESCRIPTION + This configuation will manage the Service and User Principal name suffixes + in the forest by replacing any existing suffixes with the ones specified + in the configuration. #> -configuration ReplaceForestProperties + +Configuration ReplaceForestProperties_Config { Param ( @@ -42,5 +63,4 @@ $parameters = @{ ForestName = 'contoso.com' UserPrincipalNameSuffix = 'fabrikam.com', 'industry.com' ServicePrincipalNameSuffix = 'corporate.com' - OutputPath = 'c:\output' } diff --git a/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties.ps1 b/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties.ps1 deleted file mode 100644 index c332e8237..000000000 --- a/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -<# -.EXAMPLE - This example manages the Service and User Principal name suffixes in the Consto.com - forest by adding and removing the desired suffixes. This will not overwrite existing - suffixes in the forest. -#> -configuration AddRemoveForestProperties -{ - Import-DscResource -ModuleName xActiveDirectory - - node localhost - { - xADForestProperties ContosoProperties - { - ForestName = 'contoso.com' - ServicePrincipalNameSuffixToAdd = 'test.net' - ServicePrincipalNameSuffixToRemove = 'test.com' - UserPrincipalNameSuffixToAdd = 'cloudapp.net', 'fabrikam.com' - UserPrincipalNameSuffixToRemove = 'pester.net' - } - } -} diff --git a/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties_Config.ps1 b/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties_Config.ps1 new file mode 100644 index 000000000..9a441cb86 --- /dev/null +++ b/Examples/Resources/xADForestProperties/2-AddRemoveForestProperties_Config.ps1 @@ -0,0 +1,42 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID bd5991db-7382-41cf-aefa-ba2b57af227a +.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 manage the Service and User Principal name suffixes in + the forest by adding and removing the desired suffixes. This will not overwrite + existing suffixes in the forest. +#> + +Configuration AddRemoveForestProperties_Config +{ + Import-DscResource -ModuleName xActiveDirectory + + node localhost + { + xADForestProperties ContosoProperties + { + ForestName = 'contoso.com' + ServicePrincipalNameSuffixToAdd = 'test.net' + ServicePrincipalNameSuffixToRemove = 'test.com' + UserPrincipalNameSuffixToAdd = 'cloudapp.net', 'fabrikam.com' + UserPrincipalNameSuffixToRemove = 'pester.net' + } + } +} diff --git a/Examples/Resources/xADGroup/1-NewGroup.ps1 b/Examples/Resources/xADGroup/1-NewGroup_Config.ps1 similarity index 54% rename from Examples/Resources/xADGroup/1-NewGroup.ps1 rename to Examples/Resources/xADGroup/1-NewGroup_Config.ps1 index 62a25b959..3ba0a55e7 100644 --- a/Examples/Resources/xADGroup/1-NewGroup.ps1 +++ b/Examples/Resources/xADGroup/1-NewGroup_Config.ps1 @@ -1,8 +1,28 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID f24bbdb8-4f0d-47a4-9281-d40092322cd5 +.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 creates a new domain-local group in contoso + .DESCRIPTION + This configuration will create a new domain-local group #> -configuration NewGroup + +Configuration NewGroup_Config { Param( [parameter(Mandatory = $true)] diff --git a/Examples/Resources/xADGroup/2-NewGroupWithMembers.ps1 b/Examples/Resources/xADGroup/2-NewGroupWithMembers.ps1 deleted file mode 100644 index 37d1eb203..000000000 --- a/Examples/Resources/xADGroup/2-NewGroupWithMembers.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -<# -.EXAMPLE - This example creates a new domain-local group in contoso with three members. -#> -configuration NewGroupWithMembers -{ - Import-DscResource -ModuleName xActiveDirectory - - node localhost - { - xADGroup dl1 - { - GroupName = 'DL_APP_1' - GroupScope = 'DomainLocal' - Members = 'john', 'jim', 'sally' - } - } -} diff --git a/Examples/Resources/xADGroup/2-NewGroupWithMembers_Config.ps1 b/Examples/Resources/xADGroup/2-NewGroupWithMembers_Config.ps1 new file mode 100644 index 000000000..071b0c5d2 --- /dev/null +++ b/Examples/Resources/xADGroup/2-NewGroupWithMembers_Config.ps1 @@ -0,0 +1,38 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 0d6564cf-5492-4922-b4ef-4c20da0b7b3f +.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 create a new domain-local group with three members. +#> + +Configuration NewGroupWithMembers_Config +{ + Import-DscResource -ModuleName xActiveDirectory + + node localhost + { + xADGroup dl1 + { + GroupName = 'DL_APP_1' + GroupScope = 'DomainLocal' + Members = 'john', 'jim', 'sally' + } + } +} diff --git a/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers.ps1 b/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers.ps1 deleted file mode 100644 index 9ae58afe5..000000000 --- a/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -<# -.EXAMPLE - This example creates a new domain-local group in contoso with three members in different domains. -#> -configuration NewGroupMultidomainMembers -{ - Import-DscResource -ModuleName xActiveDirectory - - node localhost - { - xADGroup dl1 - { - GroupName = 'DL_APP_1' - GroupScope = 'DomainLocal' - MembershipAttribute = 'DistinguishedName' - Members = @( - 'CN=john,OU=Accounts,DC=contoso,DC=com' - 'CN=jim,OU=Accounts,DC=subdomain,DC=contoso,DC=com' - 'CN=sally,OU=Accounts,DC=anothersub,DC=contoso,DC=com' - ) - } - } -} diff --git a/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers_Config.ps1 b/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers_Config.ps1 new file mode 100644 index 000000000..71bb6b26f --- /dev/null +++ b/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers_Config.ps1 @@ -0,0 +1,44 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 24e89cf1-5696-499e-9e3c-e44df3a9948f +.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 create a new domain-local group in contoso with + three members in different domains. +#> + +Configuration NewGroupMultidomainMembers_Config +{ + Import-DscResource -ModuleName xActiveDirectory + + node localhost + { + xADGroup dl1 + { + GroupName = 'DL_APP_1' + GroupScope = 'DomainLocal' + MembershipAttribute = 'DistinguishedName' + Members = @( + 'CN=john,OU=Accounts,DC=contoso,DC=com' + 'CN=jim,OU=Accounts,DC=subdomain,DC=contoso,DC=com' + 'CN=sally,OU=Accounts,DC=anothersub,DC=contoso,DC=com' + ) + } + } +} diff --git a/Examples/Resources/xADKDSKey/1-CreateKDSRootKey.ps1 b/Examples/Resources/xADKDSKey/1-CreateKDSRootKey.ps1 deleted file mode 100644 index 310ffd838..000000000 --- a/Examples/Resources/xADKDSKey/1-CreateKDSRootKey.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -<# - .EXAMPLE - In this example we will create a KDS root key. If you set the date to a time slightly - ahead in the future, you won't be able to use the key for at least 10 hours from the creation - time -#> - -configuration CreateKDSRootKey -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADKDSKey ExampleKDSRootKey - { - Ensure = 'Present' - EffectiveTime = '1/1/2030 13:00' - # Date must be set to at time in the future - } - } -} diff --git a/Examples/Resources/xADKDSKey/1-CreateKDSRootKey_Config.ps1 b/Examples/Resources/xADKDSKey/1-CreateKDSRootKey_Config.ps1 new file mode 100644 index 000000000..0a1bb665e --- /dev/null +++ b/Examples/Resources/xADKDSKey/1-CreateKDSRootKey_Config.ps1 @@ -0,0 +1,40 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 6c3b1da3-f139-42e5-89e9-b9c9986122c8 +.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 create a KDS root key. If the date is set to a time + slightly ahead in the future, the key won't be usable for at least 10 hours + from the creation time. +#> + +Configuration CreateKDSRootKey_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADKDSKey ExampleKDSRootKey + { + Ensure = 'Present' + EffectiveTime = '1/1/2030 13:00' + # Date must be set to at time in the future + } + } +} diff --git a/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast.ps1 b/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast.ps1 deleted file mode 100644 index 940b34b3d..000000000 --- a/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -<# - .EXAMPLE - In this example we will create a KDS root key in the past. This will allow you to use the - key right away, but if all the domain controllers haven't replicated yet, there may be issues - when retrieving the gMSA password. Use with caution -#> - -configuration CreateKDSRootKeyInPast -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADKDSKey ExampleKDSRootKeyInPast - { - Ensure = 'Present' - EffectiveTime = '1/1/1999 13:00' - AllowUnsafeEffectiveTime = $true # Use with caution - } - } -} diff --git a/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast_Config.ps1 b/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast_Config.ps1 new file mode 100644 index 000000000..4268efa8f --- /dev/null +++ b/Examples/Resources/xADKDSKey/2-CreateKDSRootKeyInPast_Config.ps1 @@ -0,0 +1,41 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID c3e0fb1e-d583-45ed-b95d-e7df1afa88b7 +.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 create a KDS root key in the past. This will allow + the key to be used right away, but if all the domain controllers haven't + replicated yet, there may be issues when retrieving the gMSA password. + Use with caution +#> + +Configuration CreateKDSRootKeyInPast_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADKDSKey ExampleKDSRootKeyInPast + { + Ensure = 'Present' + EffectiveTime = '1/1/1999 13:00' + AllowUnsafeEffectiveTime = $true # Use with caution + } + } +} diff --git a/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey.ps1 b/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey.ps1 deleted file mode 100644 index 0ba7aacc2..000000000 --- a/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -<# - .EXAMPLE - In this example we will remove the last KDS root key. Use with caution. If you have - gMSAs installed on the network, they will not be able to reset the their passwords - and it may cause services to come down -#> - -configuration CreateKDSRootKeyRemoveLastKey -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADKDSKey ExampleKDSRootKeyForceRemove - { - Ensure = 'Absent' - EffectiveTime = '1/1/2030 13:00' - ForceRemove = $true # This will allow you to remove the key if it's the last one - } - } -} diff --git a/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey_Config.ps1 b/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey_Config.ps1 new file mode 100644 index 000000000..56331ae14 --- /dev/null +++ b/Examples/Resources/xADKDSKey/3-CreateKDSRootKeyRemoveLastKey_Config.ps1 @@ -0,0 +1,40 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 2847174e-ab1c-44a0-8b4f-2ad70219b52b +.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 remove the last KDS root key. Use with caution. + If gMSAs are installed on the network, they will not be able to reset + their passwords and it may cause services to fail. +#> + +Configuration CreateKDSRootKeyRemoveLastKey_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADKDSKey ExampleKDSRootKeyForceRemove + { + Ensure = 'Absent' + EffectiveTime = '1/1/2030 13:00' + ForceRemove = $true # This will allow you to remove the key if it's the last one + } + } +} diff --git a/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount.ps1 b/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount.ps1 deleted file mode 100644 index 7b62ca8c9..000000000 --- a/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -<# - .EXAMPLE - In this example we will create a managed service account. -#> - -configuration CreateManagedServiceAccount -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADManagedServiceAccount ExampleSingleMSA - { - Ensure = 'Present' - ServiceAccountName = 'Service01' - } - } -} diff --git a/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount_Config.ps1 b/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount_Config.ps1 new file mode 100644 index 000000000..fb6fa49c5 --- /dev/null +++ b/Examples/Resources/xADManagedServiceAccount/1-CreateManagedServiceAccount_Config.ps1 @@ -0,0 +1,37 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 4ab7581b-8729-4262-ae01-b04d1af51ab2 +.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 create a managed service account. +#> + +Configuration CreateManagedServiceAccount_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADManagedServiceAccount ExampleSingleMSA + { + Ensure = 'Present' + ServiceAccountName = 'Service01' + } + } +} diff --git a/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount.ps1 b/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount.ps1 deleted file mode 100644 index 094c653d5..000000000 --- a/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -<# - .EXAMPLE - In this example we will create a managed service account. -#> - -configuration CreateGroupManagedServiceAccount -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADManagedServiceAccount ExampleGroupMSA - { - Ensure = 'Present' - ServiceAccountName = 'Service01' - AccountType = 'Group' - Path = 'OU=ServiceAccounts,DC=contoso,DC=com' - } - } -} diff --git a/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount_Config.ps1 b/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount_Config.ps1 new file mode 100644 index 000000000..55b702291 --- /dev/null +++ b/Examples/Resources/xADManagedServiceAccount/2-CreateGroupManagedServiceAccount_Config.ps1 @@ -0,0 +1,39 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 9736d8e5-f4e6-4ae9-9e3f-41267f4026a5 +.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 create a group managed service account. +#> + +Configuration CreateGroupManagedServiceAccount_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADManagedServiceAccount ExampleGroupMSA + { + Ensure = 'Present' + ServiceAccountName = 'Service01' + AccountType = 'Group' + Path = 'OU=ServiceAccounts,DC=contoso,DC=com' + } + } +} diff --git a/Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers.ps1 b/Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers_Config.ps1 similarity index 55% rename from Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers.ps1 rename to Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers_Config.ps1 index 3fce747df..5e4cd69db 100644 --- a/Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers.ps1 +++ b/Examples/Resources/xADManagedServiceAccount/3-CreateGroupManagedServiceAccountWithMembers_Config.ps1 @@ -1,9 +1,28 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID b743c31a-6db6-4aad-93fb-7f209042d8c1 +.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 will create a managed service account. + .DESCRIPTION + This configuration will create a group managed service account with members. #> -configuration CreateGroupManagedServiceAccountWithMembers +Configuration CreateGroupManagedServiceAccountWithMembers_Config { Import-DscResource -Module xActiveDirectory diff --git a/Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl.ps1 b/Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl_Config.ps1 similarity index 59% rename from Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl.ps1 rename to Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl_Config.ps1 index ae70165e3..feb0b18be 100644 --- a/Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl.ps1 +++ b/Examples/Resources/xADObjectPermissionEntry/1-DelegateFullControl_Config.ps1 @@ -1,12 +1,31 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID c096de91-61ee-41e9-917a-069c62b34d50 +.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 will add full control (GenericAll) permissions to + .DESCRIPTION + This configuration will add full control (GenericAll) permissions to the virtual computer object (VCO) ROLE01 for a cluster name object (CNO) CONTOSO\CLUSTER01$. This is used so that the Windows Failover Cluster can control the roles AD objects. #> -configuration DelegateFullControl +Configuration DelegateFullControl_Config { Import-DscResource -Module xActiveDirectory diff --git a/Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject.ps1 b/Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject_Config.ps1 similarity index 51% rename from Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject.ps1 rename to Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject_Config.ps1 index fd969ff75..69f6f92ec 100644 --- a/Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject.ps1 +++ b/Examples/Resources/xADObjectPermissionEntry/2-CreateDeleteComputerObject_Config.ps1 @@ -1,10 +1,30 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID cb962ab5-6694-43a7-a207-425c23682995 +.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 - Allow a group permission to create and delete (CreateChild,DeleteChild) - computer objects in an OU and all sub-OUs that may get created. + .DESCRIPTION + This configuration will add a group permission to create and delete + (CreateChild,DeleteChild) computer objects in an OU and any sub-OUs that + may get created. #> -configuration CreateDeleteComputerObject +Configuration CreateDeleteComputerObject_Config { Import-DscResource -Module xActiveDirectory diff --git a/Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties.ps1 b/Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties_Config.ps1 similarity index 50% rename from Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties.ps1 rename to Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties_Config.ps1 index 974586504..0295d788b 100644 --- a/Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties.ps1 +++ b/Examples/Resources/xADObjectPermissionEntry/3-ReadWriteComputerObjectProperties_Config.ps1 @@ -1,11 +1,30 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 2b2ad944-0a4f-457e-b8ad-98e86767d77c +.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 - Allow a group permission to read and write (ReadProperty,WriteProperty) - all properties of computer objects in an OU and all sub-OUs that may get - created. + .DESCRIPTION + This configuration will add a group permission to allow read and write + (ReadProperty, WriteProperty) of all properties of computer objects in + an OU and any sub-OUs that may get created. #> -configuration ReadWriteComputerObjectProperties +Configuration ReadWriteComputerObjectProperties_Config { Import-DscResource -Module xActiveDirectory diff --git a/Examples/Resources/xADOrganizationalUnit/1-CreateADOU.ps1 b/Examples/Resources/xADOrganizationalUnit/1-CreateADOU_Config.ps1 similarity index 54% rename from Examples/Resources/xADOrganizationalUnit/1-CreateADOU.ps1 rename to Examples/Resources/xADOrganizationalUnit/1-CreateADOU_Config.ps1 index 1674847d1..26ebd8f38 100644 --- a/Examples/Resources/xADOrganizationalUnit/1-CreateADOU.ps1 +++ b/Examples/Resources/xADOrganizationalUnit/1-CreateADOU_Config.ps1 @@ -1,8 +1,29 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID e7ed876c-7a6b-46d7-bb89-8288680c1691 +.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 add an Active Directory organizational unit to the 'example.com' domain root. + .DESCRIPTION + This configuration will add an Active Directory organizational unit to the + domain. #> -configuration CreateADOU + +Configuration CreateADOU_Config { Param( [parameter(Mandatory = $true)] diff --git a/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin.ps1 b/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin.ps1 deleted file mode 100644 index 924acbe35..000000000 --- a/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -<# -.EXAMPLE - This example will enable the Active Directory Recycle Bin for a specified Domain -#> - -Configuration EnableADRecycleBin -{ - Param( - [parameter(Mandatory = $true)] - [System.String] - $ForestFQDN, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $EACredential - ) - - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADRecycleBin RecycleBin - { - EnterpriseAdministratorCredential = $EACredential - ForestFQDN = $ForestFQDN - } - } -} - -$ConfigurationData = @{ - AllNodes = @( - @{ - NodeName = '2012r2-dc' - } - ) -} diff --git a/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin_Config.ps1 b/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin_Config.ps1 new file mode 100644 index 000000000..e4e4ca51d --- /dev/null +++ b/Examples/Resources/xADRecycleBin/1-EnableADRecycleBin_Config.ps1 @@ -0,0 +1,48 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 63447da7-3fe9-4d03-b680-2129a2d0318f +.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 enable the Active Directory Recycle Bin for a + specified Domain +#> + +Configuration EnableADRecycleBin_Config +{ + Param( + [parameter(Mandatory = $true)] + [System.String] + $ForestFQDN, + + [parameter(Mandatory = $true)] + [System.Management.Automation.PSCredential] + $EACredential + ) + + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADRecycleBin RecycleBin + { + EnterpriseAdministratorCredential = $EACredential + ForestFQDN = $ForestFQDN + } + } +} diff --git a/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite.ps1 b/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite.ps1 deleted file mode 100644 index 119adf4d7..000000000 --- a/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -<# - .EXAMPLE - In this example, we will create an Active Directory replication site called 'Seattle'. -#> -configuration CreateADReplicationSite -{ - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADReplicationSite 'SeattleSite' - { - Ensure = 'Present' - Name = 'Seattle' - } - } -} diff --git a/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite_Config.ps1 b/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite_Config.ps1 new file mode 100644 index 000000000..a7ed6c8e2 --- /dev/null +++ b/Examples/Resources/xADReplicationSite/1-CreateADReplicationSite_Config.ps1 @@ -0,0 +1,38 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID db6e6810-76eb-464f-9514-92bc91ec28de +.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 create an Active Directory replication site + called 'Seattle'. +#> + +Configuration CreateADReplicationSite_Config +{ + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADReplicationSite 'SeattleSite' + { + Ensure = 'Present' + Name = 'Seattle' + } + } +} diff --git a/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault.ps1 b/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault.ps1 deleted file mode 100644 index 43deb8be8..000000000 --- a/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -<# -.EXAMPLE - In this example, we will create an Active Directory replication site called 'Seattle'. - If the 'Default-First-Site-Name' site exists, it will rename this site instead of create a new one. - -#> -configuration CreateADReplicationSiteRenameDefault -{ - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADReplicationSite 'SeattleSite' - { - Ensure = 'Present' - Name = 'Seattle' - RenameDefaultFirstSiteName = $true - } - } -} diff --git a/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault_Config.ps1 b/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault_Config.ps1 new file mode 100644 index 000000000..5226ec22f --- /dev/null +++ b/Examples/Resources/xADReplicationSite/2-CreateADReplicationSiteRenameDefault_Config.ps1 @@ -0,0 +1,40 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID f486afc3-63c8-4809-a84a-34bd227023a3 +.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 create an Active Directory replication site called + 'Seattle'. If the 'Default-First-Site-Name' site exists, it will rename + this site instead of create a new one. +#> + +Configuration CreateADReplicationSiteRenameDefault_Config +{ + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADReplicationSite 'SeattleSite' + { + Ensure = 'Present' + Name = 'Seattle' + RenameDefaultFirstSiteName = $true + } + } +} diff --git a/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite.ps1 b/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite.ps1 deleted file mode 100644 index 9f557b268..000000000 --- a/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -<# - .EXAMPLE - In this example, we will remove the Active Directory replication site called 'Cupertino'. -#> -configuration RemoveADReplicationSite -{ - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADReplicationSite 'CupertinoSite' - { - Ensure = 'Absent' - Name = 'Cupertino' - } - } -} diff --git a/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite_Config.ps1 b/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite_Config.ps1 new file mode 100644 index 000000000..8c38aaf0f --- /dev/null +++ b/Examples/Resources/xADReplicationSite/3-RemoveADReplicationSite_Config.ps1 @@ -0,0 +1,38 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID 8fced2a6-bb34-400c-a44e-2c484e3bc9e3 +.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 remove the Active Directory replication site + called 'Cupertino'. +#> + +Configuration RemoveADReplicationSite_Config +{ + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADReplicationSite 'CupertinoSite' + { + Ensure = 'Absent' + Name = 'Cupertino' + } + } +} diff --git a/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink.ps1 b/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink.ps1 deleted file mode 100644 index 0084c0070..000000000 --- a/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -<# - .EXAMPLE - In this example we will create an AD Replication Site Link. -#> - -configuration CreateReplicationSiteLink -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADReplicationSiteLink HQSiteLink - { - Name = 'HQSiteLInk' - SitesIncluded = @('site1', 'site2') - Cost = 100 - ReplicationFrequencyInMinutes = 15 - Ensure = 'Present' - } - } -} diff --git a/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink_Config.ps1 b/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink_Config.ps1 new file mode 100644 index 000000000..060e98640 --- /dev/null +++ b/Examples/Resources/xADReplicationSiteLInk/1-CreateReplicationSiteLink_Config.ps1 @@ -0,0 +1,40 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID c3f14177-bf96-4296-aa1c-4a9f08c8e34e +.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 create an AD Replication Site Link. +#> + +Configuration CreateReplicationSiteLink_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADReplicationSiteLink HQSiteLink + { + Name = 'HQSiteLInk' + SitesIncluded = @('site1', 'site2') + Cost = 100 + ReplicationFrequencyInMinutes = 15 + Ensure = 'Present' + } + } +} diff --git a/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink.ps1 b/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink.ps1 deleted file mode 100644 index cbec0f860..000000000 --- a/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -<# - .EXAMPLE - In this example we will modify an existing AD Replication Site Link. -#> - -configuration ModifyExistingReplicationSiteLink -{ - Import-DscResource -Module xActiveDirectory - - Node localhost - { - xADReplicationSiteLink HQSiteLink - { - Name = 'HQSiteLInk' - SitesIncluded = 'site1' - SitesExcluded = 'site2' - Cost = 100 - ReplicationFrequencyInMinutes = 20 - Ensure = 'Present' - } - } -} diff --git a/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink_Config.ps1 b/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink_Config.ps1 new file mode 100644 index 000000000..0ece28eac --- /dev/null +++ b/Examples/Resources/xADReplicationSiteLInk/2-ModifyExistingReplicationSiteLink_Config.ps1 @@ -0,0 +1,41 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID cd618e81-b903-4ae9-9dd0-ab794931505c +.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 modify an existing AD Replication Site Link. +#> + +Configuration ModifyExistingReplicationSiteLink_Config +{ + Import-DscResource -Module xActiveDirectory + + Node localhost + { + xADReplicationSiteLink HQSiteLink + { + Name = 'HQSiteLInk' + SitesIncluded = 'site1' + SitesExcluded = 'site2' + Cost = 100 + ReplicationFrequencyInMinutes = 20 + Ensure = 'Present' + } + } +} diff --git a/Examples/Resources/xADUser/1-CreateUserAndManagePassword.ps1 b/Examples/Resources/xADUser/1-CreateUserAndManagePassword.ps1 deleted file mode 100644 index d2f8579dc..000000000 --- a/Examples/Resources/xADUser/1-CreateUserAndManagePassword.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -<# - .EXAMPLE - In this example we will create a user with a managed password. - This might be used to manage the lifecycle of a service account. -#> - -configuration CreateUserAndManagePassword -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - $Password - ) - - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADUser Contoso\ExampleUser - { - Ensure = 'Present' - UserName = "ExampleUser" - Password = $Password - DomainName = "contoso.com" - Path = "CN=Users,DC=contoso,DC=com" - } - } -} diff --git a/Examples/Resources/xADUser/1-CreateUserAndManagePassword_Config.ps1 b/Examples/Resources/xADUser/1-CreateUserAndManagePassword_Config.ps1 new file mode 100644 index 000000000..4538df4f6 --- /dev/null +++ b/Examples/Resources/xADUser/1-CreateUserAndManagePassword_Config.ps1 @@ -0,0 +1,49 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID b293f599-2660-424d-8200-61d399e44257 +.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 create a user with a managed password. + This might be used to manage the lifecycle of a service account. +#> + +Configuration CreateUserAndManagePassword_Config +{ + param + ( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [System.Management.Automation.PSCredential] + $Password + ) + + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADUser Contoso\ExampleUser + { + Ensure = 'Present' + UserName = "ExampleUser" + Password = $Password + DomainName = "contoso.com" + Path = "CN=Users,DC=contoso,DC=com" + } + } +} diff --git a/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges.ps1 b/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges.ps1 deleted file mode 100644 index 4ea5165d9..000000000 --- a/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -<# - .EXAMPLE - In this example we will create a user with a password and then ignore when the password has changed. - This might be used with a traditional user account where a managed password is not desired. -#> - -configuration CreateUserAndIgnorePasswordChanges -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - $Password - ) - - Import-DscResource -Module xActiveDirectory - - Node $AllNodes.NodeName - { - xADUser Contoso\ExampleUser - { - Ensure = 'Present' - UserName = "ExampleUser" - Password = $Password - PasswordNeverResets = $true - DomainName = "contoso.com" - Path = "CN=Users,DC=contoso,DC=com" - } - } -} diff --git a/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges_Config.ps1 b/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges_Config.ps1 new file mode 100644 index 000000000..a72a4f91f --- /dev/null +++ b/Examples/Resources/xADUser/2-CreateUserAndIgnorePasswordChanges_Config.ps1 @@ -0,0 +1,51 @@ +<#PSScriptInfo +.VERSION 1.0 +.GUID b293f599-2660-424d-8200-61d399e44257 +.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 create a user with a password and then ignore + when the password has changed. This might be used with a traditional + user account where a managed password is not desired. +#> + +Configuration CreateUserAndIgnorePasswordChanges_Config +{ + param + ( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [System.Management.Automation.PSCredential] + $Password + ) + + Import-DscResource -Module xActiveDirectory + + Node $AllNodes.NodeName + { + xADUser Contoso\ExampleUser + { + Ensure = 'Present' + UserName = "ExampleUser" + Password = $Password + PasswordNeverResets = $true + DomainName = "contoso.com" + Path = "CN=Users,DC=contoso,DC=com" + } + } +}