If FSMO role holder DC goes under upgradation process or down,

we think about FSMO roles as its important and we know the traditional NTDSUTIL way of transferring and seizing FSMO roles which takes few minutes.

To transfer all 5 of the FSMO roles.

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

transfer all 5 FSMO roles using numbers.

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

seize the roles using the –Force parameter.

Move-ADDirectoryServerOperationMasterRole -Identity “Target_DC_name” –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,

SchemaMaster,DomainNamingMaster -Force

Of course could have used the short version

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

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

 

 

https://gallery.technet.microsoft.com/PowerShell-TransferSeize-8e359e5a