How do I determine total number of Active Directory Forests in an enterprise?

G-ONE 166 Reputation points
2020-09-17T11:07:14.567+00:00

I heard that theoretically we could port scan global network for TCP 3268 i.e identifying all Global Catalog Domain Controllers(DCs). So my questions are:

  1. How Global Catalog servers is correlated with total number of Active Directory Forests in an enterprise and how can I tell number of forests by identifying all Global Catalog servers? Please elaborate this method.
  2. Is there any alternative/automated/practical way to answer this question without checking network documentation and AD design documents or interviewing? Kindly answer with explanation specific to above mentioned questions.
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,521 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,208 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,628 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
551 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Thameur-BOURBITA 33,006 Reputation points
    2020-09-17T12:39:48.737+00:00

    Hi,

    A catalog Global has a partial replicate of each child domain in forest with multiple child domains.

    global-catalog

    You can launch the following command to check the number of global catalogue in each domainenter code here

    If you want know the number of global catalog in each child domain you can run the following powershell script

    $domainlist= get-adforest | select -expandproperty domains  
      
    foreach ($domain in $domainlist)  
    {  
    $GClist = Get-Addomaincontroller -filter *  | where-object {$_.isglobalcatalog -eq $true}  
      
    $GCnumber = $GClist.count  
    write-host "the number of Global Catalog in $domain domain is $DCnumber"  
      
    }  
    

    Please don't forget to mark this reply as answer if it help you to fix your issue


  2. Hannah Xiong 6,276 Reputation points
    2020-09-21T03:23:39.357+00:00

    Hello,

    Thank you so much for posting here.

    As per my experience and knowledge, it could not tell numbers of forests by identifying all Global Catalog servers. In AD, there is no relationship between the forests since they are separate unless we create the forest trust between the forests. Besides, GC is functional within one forest.

    To understand the GC, we must first understand the concept of a "forest." A forest is a collection of one or more AD trees organized as peers and connected by two-way transitive trust relationships between the root domains of each tree. All trees in a forest share a common schema, configuration, and GC.

    Every domain controller in a forest stores three full, writable directory partitions:

    Domain directory partition
    Schema directory partition
    Configuration directory partition

    A GC server is a domain controller that stores these three writable directory partitions, as well as a partial, read-only copy of all other domain directory partitions in the forest. The additional directory partitions are "partial" because although they collectively contain every object in the directory, they have a limited set of specific attributes for each object. The AD replication system automatically builds the GC. AD automatically designates the first domain controller in a forest as a GC server, although any domain controller can be a GC server.

    When a search request is sent to port 389 (the default Lightweight Directory Access Protocol—LDAP—port for AD) on a specific domain, computer, or IP address, the search is performed on one domain directory partition. If the object isn't found in that directory partition (and isn't in the schema or configuration directory partitions), the request is referred to a domain controller in a different domain that might contain the requested object (on the basis of the distinguished name—DN—you present in the search request). Such a referral is called an LDAP referral and can be very expensive in terms of the time it takes the search to find what it's looking for.

    When a search request is sent to port 3268 (the default GC port), the search includes all directory partitions in the forest. In other words, a GC server processes the search. A GC search can return results for objects in any domain without generating a referral to a domain controller in a different domain. This tool is extremely powerful for software developers in a huge company with AD forests residing in different locations all over the world.

    For more information, we could refer to:
    https://www.itprotoday.com/active-directory/active-directory-forests-and-global-catalog

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    Best regards,
    Hannah Xiong

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.