Set-DtcLog

Set-DtcLog

Set-DtcLog modifies the Log File settings of the DTC instance specified by the DtcName parameter. Set-DtcLog will recreate the transactions log with new settings and the DTC instance will be restarted.

Syntax

Parameter Set: Default
Set-DtcLog [-DtcName <String> ] [-MaxSizeInMB <UInt32> ] [-Path <String> ] [-SizeInMB <UInt32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

Set-DtcLog modifies the Log File settings of the DTC instance specified by the DtcName parameter. Set-DtcLog will recreate the transactions log with new settings and the DTC instance will be restarted.

Parameters

-DtcName<String>

Specifies the DTC instance for which the Log File is to be modified. If this parameter is null or set to Local, this will modify the Log File for the Local DTC instance.

Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Path<String>

Specifies the physical or network path for the new Log File to be stored. If a Log File already exists in the specified path it will be overwritten.

Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-SizeInMB<UInt32>

Specifies the initial file allocation size of the new Log File in MB.

Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-MaxSizeInMB<UInt32>

Specifies the maximum file size of the new Log File in MB.

Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Examples

Modifying the DTC Log File settings using Set-DtcLog

Using Set-DtcLog to modify the Log File settings.

PS C:\> Set-DtcLog -Path C:\Windows\system32\MSDtc\NewLog\ -SizeInMB 32 -MaxSizeInMB 1024

Verifying that the changes were made using Get-DtcLog.

PS C:\> Get-DtcLog
MaxSizeInMB      : 1024
Path : C:\Windows\system32\MSDtc\NewLog
SizeInMB : 32