Active Directory 2016: Move the FSMO Roles with PowerShell
Here is a quick tip on firstly how to check which domain controller the FSMO roles are situated on and secondly, moving the FSMO roles with one command.
To determine which server/s are holding the the FSMO roles, you can run the command below:
- netdom query fsmo
This will output the following:
- Schema Master
- Domain Naming Master
- RID pool Master
- Infrastructure Master
Now to move all the roles to a single server, you can run the following command:
- Move-ADDirectoryServerOperationMasterRole -Identity “NewDC” –OperationMasterRole DomainNamingMaster,PDCEmulator,RIDMaster,SchemaMaster,InfrastructureMaster
Replace “NewDC” with the name of your new domain controller.
I didn’t include the -confirm:$All switch as i wanted to show you each prompt as per below:
As you can see, it asks you to confirm each role to move.
Once done, let active directory replication take place and if you run the first command, you will see the new server listed and not the old one.
Hope it helps.