How to detect ActiveDirectory Schema master from the command line in Windows Server 2003 and WS2k3R2

active-directory

This spectacular MSDN article details how to do it in C++. And it vaguely mentions some utilities that don't appear to be on my system at all, and gives no ideas how to do this from a regular Windows Server 2003 R2 or Windows Server 2003 domain controller.

The need to detect an active directory schema master occurs because (even though I can't figure out how this happened) I am trying to run adprep as a step in upgrading from 2003 to 2008R2 or 2012 server level domains, but its first command that you run (adprep /domainPrep and adprep /forestPrep) should be run on something called the "Schema Master".

Best Answer

From a GUI

On a computer with the AD tools installed (ADUC, Sites & Services, etc)

  1. Run regsvr32 schmmgmt.dll from an elevated command prompt

  2. Run mmc.exe

  3. In the empty console that opens add the Active Directory Schema Management snap-in.

  4. Right click on the Schema icon and select Operations Master. This will show you who currently holds it and allow you to transfer it.

enter image description here


From the command line

netdom query fsmo.

netdom.exe is built into Windows 7 (and maybe Vista) and it part of the 2003 Resource Kit. I believe that it is also installed on 2003 Domain Controllers during dcpromo.