dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaMsdtc

Displays information about the Distributed Transactioon Coordinator (MSDTC) on a server.

Returns a custom object with Computer name, state of the MSDTC Service, security settings of MSDTC and CID’s.

Requires: Windows administrator access on Servers.

Screenshots

Examples

Get DTC status for the server srv0042

Get-DbaMsdtc -ComputerName srv0042

Get DTC status for all the computers in a .txt file.

$Computers = (Get-Content D:\configfiles\SQL\MySQLInstances.txt | % {$_.split(‘\’)[0]})
$Computers | Get-DbaMsdtc

Get DTC status for all the computers where the MSDTC Service is not running.

Get-DbaMsdtc -Computername $Computers | where { $_.dtcservicestate -ne ‘running’ }

Get DTC status for the computer srv0042 and show in a grid view.

Get-DbaMsdtc -ComputerName srv0042 | Out-Gridview

Author

This command was created by Klaas Vandenberghe. You can find Klaas on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaMsdtc -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaMsdtc.ps1 on GitHub
 

Related commands