AddsTrusts creates new forest or external domain trusts.
Use this resource when you need to establish trust relationships between Active Directory domains or forests. This is necessary when users in one domain need to access resources in another domain, such as during mergers, cross-forest collaboration, or multi-domain architectures.
A trust is a relationship, which you establish between domains or forests. To understand more about trusts in Active Directory, please see the article Forest Design Models for more information.
Source |
|
DSC Resource |
|
Documentation |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Mandatory |
Hashtable[] |
The list of trusts to configure. Includes |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
SourceDomainName |
Key |
String |
Specifies the name of the Active Directory domain that is requesting the trust. |
|
TargetDomainName |
Key |
String |
Specifies the name of the Active Directory domain that is being trusted. |
|
TargetCredential |
Mandatory |
PSCredential |
Specifies the credentials to authenticate to the target domain. |
|
TrustType |
Mandatory |
String |
Specifies the type of trust. The value |
|
TrustDirection |
Mandatory |
String |
Specifies the direction of the trust. |
|
AllowTrustRecreation |
Boolean |
Specifies if the trust is allowed to be recreated if required. |
|
|
Ensure |
String |
Specifies whether the trust is present or absent. |
|
AddsTrusts:
Trusts:
- TargetDomainName: northwindtraders.com
TargetCredential: '[ENC=PE9ianMgVmVyc2lvbj0iMS4xLjAuMSIgeG1sbnM9...=]'
TrustDirection: Bidirectional
TrustType: Forest
SourceDomainName: contoso.com
- TargetDomainName: partsunlimited.com
TargetCredential: '[ENC=PE9ianMgVmVyc2lvbj0iMS4xLjAuMSIgeG1sbnM9...=]'
TrustDirection: Outbound
TrustType: External
SourceDomainName: contoso.com