From 9dab36ae753e9ef1bca4ecc591529f65956f0ab5 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Fri, 2 Aug 2019 16:04:10 +0200 Subject: [PATCH] Update help.txt --- .../en-US/about_ADDomainTrust.help.txt | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/DSCResources/MSFT_ADDomainTrust/en-US/about_ADDomainTrust.help.txt b/DSCResources/MSFT_ADDomainTrust/en-US/about_ADDomainTrust.help.txt index c1b955a39..2f9d9bbc7 100644 --- a/DSCResources/MSFT_ADDomainTrust/en-US/about_ADDomainTrust.help.txt +++ b/DSCResources/MSFT_ADDomainTrust/en-US/about_ADDomainTrust.help.txt @@ -35,12 +35,16 @@ Key - String Specifies the name of the Active Directory domain that is requesting the trust. +.PARAMETER AllowTrustRecreation + Write - Boolean + Specifies if the is allowed to be recreated if required. Default value is $false. + .EXAMPLE 1 This configuration will create a new one way inbound trust between two domains. -Configuration ADDomainTrust_NewOneWayTrust_Config +Configuration ADDomainTrust_ExternalInboundTrust_Config { param ( @@ -73,4 +77,44 @@ Configuration ADDomainTrust_NewOneWayTrust_Config } } +.EXAMPLE 2 + +This configuration will create a new one way inbound trust between two +domains, and allows the trust to recreated if it should have the wrong +trust type. + +Configuration ADDomainTrust_ExternalInboundTrustWithOptInToRecreate_Config +{ + param + ( + [Parameter(Mandatory = $true)] + [System.String] + $SourceDomain, + + [Parameter(Mandatory = $true)] + [System.String] + $TargetDomain, + + [Parameter(Mandatory = $true)] + [System.Management.Automation.PSCredential] + $TargetDomainAdminCred + ) + + Import-DscResource -module ActiveDirectoryDsc + + node localhost + { + ADDomainTrust 'Trust' + { + Ensure = 'Present' + SourceDomainName = $SourceDomain + TargetDomainName = $TargetDomain + TargetCredential = $TargetDomainAdminCred + TrustDirection = 'Inbound' + TrustType = 'External' + AllowTrustRecreation = $true + } + } +} +