How to determine if a Windows Server is a DC and a GC


In this article we will discover how we can determine if a server is a Domain Controller and a Global Catalog Server within an Active Directory domain. The easiest way to verify these things is by using the Sites and Services console:
Sites and Services console
Using this interface you can view all AD sites along with their Domain Controllers. Another method to achieve the same results is by using the dsquery command line tool. Dsquery can be used to display all domain controllers from the present domain. This tool is build in the Windows Server 2008 versions and can be used if there is an Active Directory Domain Services (AD DS) infrastructure. You must invoke this command line utility within an elevated command prompt:
dsquery tool
Because I’m using a single DC in my testing environment, the result is straight forward. If you have a complex AD infrastructure, you can refine your search by adding different parameters available with this tool. You can search for a Server that is holding one of the FSMO roles by using the -hasfsmo parameter. The query can be made by location, site, name, forest, etc. You can view all the available parameters for this command line utility by typing dsquery /?:
dsquery command
We can also verify if a Server is a DC by checking the Active Directory Users and Computers console under the Domain Controllers OU. By default, when a new DC is added to an existing domain, it will be automatically added under this organizational unit:
Active Directory Users and Computers
From the same console we can check if this Server is also a Global Catalog Server. Right click the Server and click again on the Properties button. Navigate to the General tab and check the Domain Controller Type:
Domain Controller Type
Another method of checking if a DC is a also a GC is by looking in the Active Directory Sites and Services console. Open the console navigate to the Default-First-Site-Name (if this was not changed after creating the Site) and expand the Servers folder. Select the Server, right click on it and click again on the Properties button. In the General tab you can view the DC Type:
Domain Controller Properties
We can check a DC Type by using the dsquery command with the -isgc  parameter:
dsquery utility
A short description of this parameter can be viewed by using the dsquery server /? command:
dsquery utility
I’m sure there are other methods that can be used to achieve the same results so please add a comment if you have another one. Hope you’ll find this article useful, if there are things that need to be mentioned on this topic, don’t hesitate to leave a comment. Enjoy your day and stay tuned for the following articles.
Advertisements

One thought on “How to determine if a Windows Server is a DC and a GC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s