To transfer all FSMO roles from one DC to another you can use the following line in powershell:
Move-ADDirectoryServerOperationMasterRole -Identity “Target-DC” -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator
Replace “Target-DC” with the name of the domain controll (case sensitive)
To seize the roles, add “-Force” in the end of the command