I am interested in ForestTrustDomainInformation for a domain object. But I am unable to find a C# API that I can use the retrieve this information.
How can I retrieve the ForestTrustDomainInformation
for a domain that I am interested in? I went through a bunch of Active Directory documentation. But I couldn't find a way to retrieve this info.
CodePudding user response:
It's not used with a Domain
object, but from a Forest
object, since it contains information for a trust between forests.
Assuming you have a Forest
object, you can use GetTrustRelationship()
with the name of the other forest. That returns a ForestTrustRelationshipInformation
object, that has a TrustedDomainInformation
property that contains a list of ForestTrustDomainInformation
objects.