Trust Relationship: Sample Case II

Scenario
Given two domains - Domain1 and Domain2- you want to create a trust relationship between Domain1 and Domain2 - that is, you want to add Domain2 as a trusted domain of Domain1.

Assumptions

Procedure
Use the EstablishTrust method of IDomainTrustManagement to create the required trust relationship in one single operation.

Script

Dim Trust As IDomainTrustManagement
'Get the interface.
Set Trust = GetObject ("NTDS://Domain1")
'Establish trust relationship with Domain2
Trust.EstablishTrust "Domain2", ONE_WAY_TRUST

 

 

See Also