Listing all the FSMO roles at once via different ways -
Command 1- net dom query fsmo
Command 2 - Listing Domain Wide FSMO roles
Command 3 - Listing Forest wide FSMO roles
As per all above snaps, we can find out which DC's are holding different FSMO roles.
Our task would be to move Schema & Infrastructure master role from "DDC01" to another DC named "GDC01".
Below command will be used for movement.
Syntax
Move-ADDirectoryServerOperationMasterRole -Identity "DestinationDC" -OperationMasterRole 'FSMO Roles separated by comma'