LDAP query across forests
Posted on 2013-12-04
I have two domain forests. Let's call the 1st mydomain.com and 2nd is otherdomain.com.
I have a script that creates new user accounts, including the SamID from an input file called newusers.csv. There's already a query to check for duplicate SamID's in mydomain.com, if a match is found the script exits with an a message of 'Duplicate SamID' found'.
I need a script to query for duplicate SamID's in otherdomain.com. There is a two-way trust between the forests.