Using Windows PowerShell CmdLets to Migrate MSDTC Settings

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

You can use the Windows PowerShell cmdlets provided with Microsoft Distributed Transaction Coordinator (MSDTC) to support deployment agility in a variety of scenarios including server migration, imaging, and upgrading.

You can use cmdlets to retrieve all MSDTC settings, including standard settings (log, network, and trace) and advanced settings (other registry keys) and then use other cmdlets to write these settings to a new server. Because these cmdlets apply to a particular DTC instance (by default, to Local), and you may need to apply them multiple times, if necessary.

You can use the following cmdlets as part of this process:

  • Get-Dtc: retrieves the list of DTC instances on the machine and the complete list of standard settings (log, network, and trace) for a given DTC instance.

  • Get-DtcLog and Set-DtcLog: retrieve all of the DTC log settings for a given DTC instance on the machine (Get-DtcLog) and write the DTC log settings to the new server (Set-DtcLog).

  • Get-DtcNetworkSetting and Set-DtcNetworkSetting: retrieve all of the DTC network settings for a given DTC instance on the machine (Get-DtcNetworkSetting) and write the DTC network settings to the new server (Set-DtcNetworkSetting).

  • Get-DtcTransactionsTraceSetting and Set-DtcTransactionsTraceSetting: retrieve all of the DTC transaction trace settings on the machine (Get-DtcTransactionsTraceSetting) and write the DTC transaction trace settings to the new server (Set-DtcTransactionsTraceSetting).

  • Get-DtcAdvancedSetting and Set-DtcAdvancedSetting: retrieve (Get-DtcAdvancedSetting) and write (Set-DtcAdvancedSetting) advanced settings that are used by a particular DTC instance on the machine.

  • Get-DtcAdvancedHostSetting and Set-DtcAdvancedHostSetting: retrieve (Get-DtcAdvancedHostSetting) and write (Set-DtcAdvancedHostSetting) advanced host settings that DTC uses on the machine.

  • Start-Dtc: starts a particular DTC instance on the new server once it has been configured.

  • Install-Dtc: configures the MSDTC NT service for a different startup or log path on the new server.

If needed, you can also adjust MSDTC settings manually by running Component Services (Start/Administrative Tools/Component Services), as in previous versions of Microsoft Windows.