Transfer FISMO Roles with PowerShell



Problem

You need to move the FSMO roles, and you would rather do it in PowerShell than click through the old MMC snap-ins.

Solution

Use the Active Directory PowerShell module. If it is not already loaded, import it first.

Import-Module ActiveDirectory

See who has the forest roles

Get-ADForest contoso.com | ft DomainNamingMaster, SchemaMaster

See who has the domain roles

Get-ADDomain contoso.com | ft InfrastructureMaster, PDCEmulator, RIDMaster

Move one role

This hands the PDC Emulator role to the domain controller named DCX.

Move-ADDirectoryServerOperationMasterRole -Identity "DCX" PDCEmulator

PowerShell also accepts the role as a number:

  • 0 = PDCEmulator
  • 1 = RIDMaster
  • 2 = InfrastructureMaster
  • 3 = SchemaMaster
  • 4 = DomainNamingMaster

Move several roles

Move-ADDirectoryServerOperationMasterRole -Identity "DCX" -OperationMasterRole DomainNamingMaster,PDCEmulator,RIDMaster,SchemaMaster,InfrastructureMaster

Move all of them by number

Move-ADDirectoryServerOperationMasterRole "DCX" -OperationMasterRole 0,1,2,3,4

That's it. Same command either way. Name the destination domain controller, then list the roles you want it to take.

References

Move-ADDirectoryServerOperationMasterRole

Migrating FSMO roles from Windows Server 2012 R2 to 2016

0 Comments:

Post a Comment

My Instagram