I just added new domain controllers (2012 R2) to my domain.
And was looking for powershell options to migrate my FSMO roles.
Well here it is!
#Registering the Schema Tool regsvr32 schmmgmt.dll #Check AD FSMO roles netdom Query fsmo Move-ADDirectoryServerOperationMasterRole -Identity "NEW-DC" -OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster <# PDCEmulator or 0 RIDMaster or 1 InfrastructureMaster or 2 SchemaMaster or 3 DomainNamingMaster or 4 #> #check AD FSMO roles result: netdom Query fsmo
Update:
Perhaps you will receive the following error:
Move-ADDirectoryServerOperationMasterRole : Access is denied
At line:1 char:42
+ Move-ADDirectoryServerOperationMasterRole <<<< -Identity “DC02” -OperationMa
sterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMa
ster
+ CategoryInfo : NotSpecified: (Microsoft.Activ…DirectoryServer
:ADDirectoryServer) [Move-ADDirector…ationMasterRole], ADException
+ FullyQualifiedErrorId : Access is denied,Microsoft.ActiveDirectory.Manag
ement.Commands.MoveADDirectoryServerOperationMasterRole
Your user does not have the correct permissions. Your user must be Enterprise Admin of be a member of the Schema admin group.