Share via


Test-Dtc

Test-Dtc

Tests whether two computers can participate in networked transactions.

Sintaxe

Parameter Set: Default
Test-Dtc [[-LocalComputerName] <String> ] [[-RemoteComputerName] <String> ] [[-ResourceManagerPort] <Int32> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrição detalhada

The Test-Dtc cmdlet tests whether two computers can participate in networked transactions. The cmdlet performs the following tests:

-- Checks whether the required firewall rules are enabled.
-- Checks whether the Microsoft Distributed Transaction Coordinator (MSDTC) network security settings are correctly configured for network transactions.
-- Checks whether the two computers can ping each other.
-- Checks whether a transaction can be propagated between the two computers.

Parâmetros

-InformationAction<System.Management.Automation.ActionPreference>

Aliases

infa

Necessário?

false

Posição?

named

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-InformationVariable<System.String>

Aliases

iv

Necessário?

false

Posição?

named

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-LocalComputerName<String>

Specifies the virtual server name of the MSDTC instance on the local computer to test.

Aliases

none

Necessário?

false

Posição?

1

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-RemoteComputerName<String>

Specifies the virtual server name of the MSDTC instance on the remote computer to test.

Aliases

none

Necessário?

false

Posição?

2

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-ResourceManagerPort<Int32>

Specifies the port number that the MSDTC diagnostic Resource Manager uses. If you do not specify a value, this cmdlet uses a default value of 3002.

Aliases

none

Necessário?

false

Posição?

3

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Confirm

Solicita que você confirme antes de executar o cmdlet.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-WhatIf

Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

<CommonParameters>

Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.

Saídas

O tipo de saída é o tipo de objeto emitido pelo cmdlet.

Exemplos

Example 1: Test MSDTC on the local comptuter

This command tests MSDTC on the local computer.

PS C:\> Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -Verbose

Example 2: Test MSDTC on the local computer and a remote computer

This command tests the local computer and the computer named Contoso075. The command specifies a resource manager port.

PS C:\> Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "Contoso075" -ResourceManagerPort 17100 -Verbose

Example 3: Test MSDTC on a local computer that blocks inbound transactions

This command tests the local computer and the computer named Contoso075. The output from this test shows that the local computer does not allow inbound transactions.

PS C:\> Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "Contoso075" -ResourceManagerPort 17100 -Verbose

Example 4: Test MSDTC on a local computer that blocks outbound transactions

This command tests the local computer and the computer named Contoso075. The output from this test shows that the local computer does not allow outbound transactions.

PS C:\> Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "Contoso075" -ResourceManagerPort 17100 -Verbose

Tópicos relacionados

Get-Dtc

Install-Dtc

Start-Dtc

Stop-Dtc

Uninstall-Dtc