The dfsrmig command in Windows
Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.
The dfsrmig command moves the SYSvol copy from File Replication Service (FRS) to Distributed File System (DFS), providing information about the process of moving and modifying Active Directory Domain Services (AD DS) - active directory object. dynamic - to support movement. For examples of how to use this command, see the Example below.
Syntax command dfsrmig
dfsrmig [/SetGlobalState | /GetGlobalState | /GetMigrationState | /createGlobalObjects | /deleteRoNtfrsMember  | /deleteRoDfsrMember  | /?]
ParametersSetGlobalState Description / SetGlobalState parameter
Set the common move state to give the domain a state corresponding to the value specified by the state.
To proceed through the process of moving or rotating, use this command to switch to valid states. This option allows you to start and control the migration process by setting the global migration status in AD DS on the PDC emulator. If the PDC emulator is not available, this command fails.
You can only set the general move status to steady state. Therefore, the valid values are 0 for the start state (Start), 1 for the Prepared state, 2 for the redirected state (Redirected), and 3 for the redirected state (Eliminated).
The move to the discard state cannot be changed and reversed from the state that cannot be performed, so use value 3 for state, only if you are committed to using DFS Replication for SYSvol replication. ./ GetGlobalState
Specify the current common migration status for the domain from the local copy of the AD DS database, when running on the PDC emulator.
Use this option to confirm that you have set the general migration status. Only stable migration states can make the general migration state, so the results that the dfsrmig command reports with the / GetGlobalState option correspond to the states you can set with the / SetGlobalState option. .
You should run the dfsrmig command with / GetGlobalStateoption on the PDC emulator. The current directory replication activity replicates the general state to other domain controllers in that domain, but the replication delay can cause conflicts, if you run the dfsrmig command with the / GetGlobalState option on a different domain controller. PDC emulator. To check the domain controller's local move status other than the PDC emulator, use the / GetMigrationState option instead./ GetMigrationState
Specify the current local move state for all domain controllers in that domain and determine whether those local states match the current general migration state.
Use this option to determine if all domain controllers have reached the general migration state. The output of the dsfrmig command when you use the / GetMigrationState option indicates whether the move to the current general state is complete, and it lists the local migration status for any domain controller that has not reached the state. Current general move. Local migration state for domain controllers may include conversion states for domain controllers that have not yet reached the current general migration state./ createGlobalObjects
Generate common objects and settings in AD DS that DFS Replication uses.
You do not need to use this option during normal migration, because DFS Replication Service automatically creates objects and installs this AD DS during the migration from the Start state to the Prepared state. Use this option to create objects and install them manually in the following cases:
- A read-only domain controller is only used during migration : The DFS Replication service automatically creates AD DS objects and the DFS replica settings during migration from the Start state to the Prepared state. If the read-only domain controller is only used during this migration process, but before moving to the Eliminated state, the objects corresponding to the newly read-only domain controller will not be created in AD DS. , do the copy and move process to defeat.
- In this case, you can run the dfsrmig wth option of / createGlobalObjects to manually create the objects on any read-only domain controller. Running this command does not affect the domain controller that already has the objects and settings for the DFS Replication service.
- The general settings for DFS Replication service are missing or deleted : If the settings for a specific domain controller are missing, moving from the Start state to the Prepared states will stop at the transition Preparing status. with domain controller. In this case, you can use the dfsrmig command with the / createGlobalObjects option to create the settings manually.
Note: Because of the general AD DS installation for the DFS Replication service for a read-only domain controller created on the PDC emulator, these settings need to be replicated to a read-only domain controller from the PDC emulator, before DFS Replication service on a read-only domain controller can use these settings. Due to the delay in the replication of the current directory, this copying process may take some time to complete./ deleteRoNtfrsMember 
Delete the general AD DS setting to copy the FRS corresponding to the read-only domain controller, or delete the general AD DS setting to replicate FRS for all read-only domain controllers, if no value is specified for read_only_domain_controller_name.
You do not need to use this option during normal migration, because the DFS Replication service automatically deletes these AD DS settings while moving from the Redirected state to the Eliminated state. Because the read-only domain controller cannot delete these settings from AD DS, the PDC emulator does this, and the last changes are copied to the read-only domain controller after the waiting time applies. Copy current directory.
You use this option to manually remove the AD DS settings, only when automatically deleting on the read-only domain controller and delaying the read-only domain controller for a long time, when moving from the Redirected state. to Eliminated state./ deleteRoDfsrMember 
Delete the global AD DS settings for DFS Replication that correspond to the read-only domain controller, or delete the general AD DS settings for DFS Replication, for all read-only domain controllers, if there is no specified value for read_only_domain_controller_name .
Use this option to manually remove AD DS settings, only if automatic deletion fails on the read-only domain controller and delay the read-only domain controller for a long time, when returning too The process moves from Prepared state to Start state./? Show help at the command prompt. Equivalent to running dfsrmig without any options.
- Dfsrmig.exe, the migration tool for DFS Replication service, is installed with the DFS Replication service for a new Windows Server 2008 server, Dcpromo.exe installs and starts the DFS Replication service when you use a domain computer controller. When you upgrade a server from Windows Server 2003 to Windows Server 2008, the upgrade process will install and start the DFS Replication service. You do not need to install the DFS Replication role service to install and start the DFS Replication service.
- The dfsrmig tool is only supported on domain controllers that run at the functional level on the Windows Server 2008 domain, because moving SYSvol from FRS to DFS Replication can only be performed on a functional domain controller on the Windows Server 2008 domain. .
- You can run dfsrmig on any domain controller, but operations to create or control AD DS objects are only allowed on read-write domain controllers (not on read-only domain controllers).
- Run dfsrmig without any options displaying help at the command prompt.
To set the general move state to prepare ( 1 ) and start moving to or back from Prepared status , enter:
dfsrmig /SetGlobalState 1
To set the general move state to start (0) and initiate the return to Start state, enter:
dfsrmig /SetGlobalState 0
To display general migration status, enter:
This example shows a typical output from the dfsrmig / GetGlobalState command.
Current DFSR global state: Prepared Succeeded.
To display information about whether the general migration state on all domain controllers matches the general migration state and local migration state for any domain controller, the local state does not match the state. Any common, please enter:
This example shows typical output from the dfsrmig / GetMigrationState command when the state moves locally on all domain controllers that match the general migration state:
All Domain Controllers have migrated successfully to Global state ( Prepared ). Migration has reached a consistent state on all Domain Controllers. Succeeded.
* The following domain controllers are not synchronized with Global (Prepared) status:
- Domain controller (local moving state) type DC
- CONTOSO-DC2 (Start state) read-only
- DC CONTOSO-DC3 (Preparing status)
The writable DC move has not reached a consistent state on all domain controllers. Status information may be obsolete due to AD delay.
To create the common objects and settings that DFS Replication uses in AD DS on domain controllers where those settings are not created automatically during migration or are missing, enter:
To delete the general AD DS settings, to recreate the FRS for the read-only domain controller named contoso-dc2, if those settings are not deleted automatically by the migration process, enter:
dfsrmig /deleteRoNtfrsMember contoso-dc2
To delete the general AD DS settings to replicate FRS for all read-only domain controllers, if those settings are not deleted automatically by the migration process, enter:
To delete the general AD DS setting for DFS Replication for a read-only domain controller named contoso-dc2, if those settings are not deleted automatically by the migration process, enter:
dfsrmig /deleteRoDfsrMember contoso-dc2
To delete the global AD DS setting for DFS Replication for all read-only domain controllers, if those settings are not deleted automatically by the migration process, enter:
- The convert in Windows command
- Cscript command in Windows
- Compact command in Windows
- Sub-commands in nslookup Windows command (Part 2)
- Sub-commands in the nslookup Windows command (Part 1)
- Sub-commands in nslookup Windows command (Part 3)
- Command at in Windows
- Set command in Windows
- 10 useful commands in Windows you should know
- Del command in Windows
- The command reg add in Windows
- Rem command in Windows
- Instructions for using Command Prompt