Manage FSMO Roles with Powershell

Posted By on May 22, 2015 |


To transfer all 5 of the FSMO roles simply run the following command in PowerShell:

Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster

To shorten the command line syntax you can use role numbers in place of the role names.  The following list details the role number for each of the five FSMO roles.

  • PDC Emulator – 0
  • RID Master – 1
  • Infrastructure Master – 2
  • Schema Master – 3
  • Domain Naming Master – 4

Using numbers instead you would run the following command in PowerShell:

Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole 0,1,2,3,4

Now in my case since the DC was gone permanently I had to seize the roles using the –Force parameter.  This is the PowerShell command I ran to seize the roles:

Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster -Force

Using numbers instead you would run the following :

Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole 0,1,2,3,4 -force