< Back

Set-DtcLog

Tue Jan 29, 2019 10:24 pm

NAME Set-DtcLog



SYNOPSIS

Modifies the log file settings of a DTC instance.





SYNTAX

Set-DtcLog [-CimSession <CimSession[]>] [-DtcName <String>] [-MaxSizeInMB <UInt32>] [-Path <String>] [-SizeInMB <UInt32>] [-ThrottleLimit <Int32>]

[-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-DtcLog cmdlet modifies the log file settings of a Distributed Transaction Coordinator (DTC) instance. Use the DtcName parameter to specify

a DTC instance. This cmdlet also recreates the transactions log with new settings and restarts the DTC instance.





PARAMETERS

-CimSession [<CimSession[]>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession

or Get-CimSession cmdlet. The default is the current session on the local computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DtcName [<String>]

Specifies a DTC instance. The cmdlet modifies the log file for this instance. If you do not specify this parameter, or if you specify a value

of Local, this cmdlet modifies the log file for the local DTC instance.



Required? false

Position? named

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-MaxSizeInMB [<UInt32>]

Specifies the maximum file size of the new log file in MB.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Path [<String>]

Specifies the physical or network path to store the new log file. If a log file already exists in the specified path it is overwritten.



Required? false

Position? named

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-SizeInMB [<UInt32>]

Specifies the initial file allocation size of the new log file in megabytes.



Required? false

Position? named

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-ThrottleLimit [<Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0

is entered, then Windows PowerShell???? calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running

on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS











OUTPUTS











Example 1: Set the log file path and file size



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

PS C:\\> Get-DtcLog

MaxSizeInMB : 1024

Path : C:\\Windows\\system32\\MSDtc\\NewLog

SizeInMB : 32



The first command sets the path for the DTC log file and specifies the file size. The second command confirms the change.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=317177

Get-DtcLog

Reset-DtcLog