How to Migrate FRS to DFSR Replication Method

When attempting to promote a new Domain Controller and you get this warning:

The specified domain %1 is still using the File Replication Service (FRS) to replicate the SYSVOL share. FRS is deprecated. The server being promoted does not support FRS and cannot be promoted as a replica into the specified domain. You MUST migrate the specified domain to use DFS Replication using the DFSRMIG command before continuing. For more information, see https://go.microsoft.com/fwlink/?linkid=849270. First, make sure all Domain Controllers are replicated:

Repadmin /syncall /force /APed

Then, start the migration; migrate to ‘Prepared’ state:

Dfsrmig /setglobalstate 1

Make sure the process has finished:

Dfsrmig /getmigrationstate

You should get: Only then continue with:

Dfsrmig /setglobalstate 2

You should get: Only then continue with:

Dfsrmig /setglobalstate 3

You should get: Finally, stop the service: