An easy way to transfer FSMO roles

The Problem

There are multiple ways to transfer the FSMO roles. If you are like us, and when you transfer one role, you usually need to transfer them all, this one-liner is a beauty to get the job done.

    The Fix

    Open PowerShell as an Administrator on one of the domain controllers and run the following command:

    Move-ADDirectoryServerOperationMasterRole -Identity <NewServerName> -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster