Scripting operations master role transfers (321469)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server

This article was previously published under Q321469

SUMMARY

The Microsoft Windows 2000 Resource Kit describes how to script operations master role transfers (also known as flexible single master operations transfers or FSMO transfers). This article contains additional information that was not included in the Resource Kit.

MORE INFORMATION

In Active Directory directory service, operations master role transfers are exposed as a Lightweight Directory Access Protocol (LDAP) update operation to a RootDSE operational attribute of the domain controller that is taking the role. The following table shows which RootDSE operational attribute corresponds to each role:
Operations master roleRootDSE operational attribute
Schema operations masterbecomeSchemaMaster
Domain naming operations masterbecomeDomainMaster
Relative ID (RID) operations masterbecomeRidMaster
primary domain controller (PDC) becomePdc
emulator operations masterbecomeInfrastructureMaster
For example, by running the following Visual Basic Script program and by using the CScript command on a domain controller, you can transfer the domain naming master role to that domain controller:
Set dse = GetObject("LDAP://localhost/RootDSE")
dse.Put "becomeDomainMaster", 1
dse.SetInfo
This example works correctly for all operations master roles except for the PDC emulator role. To use the becomePdc attribute, you must provide the domain security identifier (SID) (in binary format) to the becomePdc attribute to trigger the operations master role transfer between two domain controllers of the same domain.

The following is an example of how to use the becomePdc attribute:

Set dse = GetObject("LDAP://localhost/RootDSE")
set myDomain = GetObject("LDAP://" & dse.get("defaultNamingContext"))
myDomainSid = myDomain.objectSid
dse.Put "becomePdc",myDomainSid
dse.SetInfo

Modification Type:MajorLast Reviewed:8/18/2004
Keywords:kbhowto kbinfo KB321469