Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Set-DfsrServiceConfiguration

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Set-DfsrServiceConfiguration

Modifies settings for the DFS Replication service.

Syntax

Parameter Set: Default
Set-DfsrServiceConfiguration [[-ComputerName] <String[]> ] [[-RPCPort] <UInt32> ] [[-DisableDebugLog] <Boolean> ] [[-MaximumDebugLogFiles] <UInt32> ] [[-DebugLogPath] <String> ] [[-DebugLogSeverity] <UInt32> ] [[-MaximumDebugLogMessages] <UInt32> ] [[-UnexpectedAutoRecovery] <Boolean> ] [[-CleanupStagingFolderAtPercent] <UInt32> ] [[-CleanupStagingFolderUntilPercent] <UInt32> ] [[-CleanupConflictFolderAtPercent] <UInt32> ] [[-CleanupConflictFolderUntilPercent] <UInt32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-DfsrServiceConfiguration cmdlet modifies settings for the Distributed File System (DFS) Replication service on replication group members. Members of a replication group host replicated folders. Use this cmdlet to configure cleanup settings, debug logging settings, and automatic recovery for unexpected shut down.

DFS Replication stores files in a folder named ConflictsAndDeleted until it deletes them for space. DFS Replication can stage files in a staging folder. In both cases, you can set a maximum folder size, called a quota, by using the Set-DfsrMembership cmdlet. Use the current cmdlet to set the percent of the quota used to start and stop deletion of older files.

By default, DFS Replication enables debug logging. You can disable logging. You can also change the number of lines written to each log file, the severity of messages written to log files, the number of log files to keep, and the location to store log files.

Parameters

-CleanupConflictFolderAtPercent<UInt32>

Specifies a percent value from 80 to 100. The default value is 90.

When the ConflictsAndDeleted folder size reaches this percent of the ConflictsAndDeleted quota, the DFS Replication service deletes the oldest files until the folder size falls below a set percent of the quota. You can specify that percent value by using the CleanupConflictFolderUntilPercent parameter.


Aliases

none

Required?

false

Position?

11

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CleanupConflictFolderUntilPercent<UInt32>

Specifies a percent value from 10 to 100. The default value is 60.

After the DFS Replication service starts cleanup of the ConflictsAndDeleted folder, it continues to delete the oldest files until the folder size reaches this percent of the ConflictsAndDeleted quota.


Aliases

none

Required?

false

Position?

12

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CleanupStagingFolderAtPercent<UInt32>

Specifies a percent value from 80 to 100. The default value is 90.

When the staging folder size reaches this percent of the staging folder quota, the DFS Replication service deletes the oldest files until the folder size falls below a set percent of the quota. You can specify that percent value by using the CleanupStagingFolderUntilPercent parameter.


Aliases

none

Required?

false

Position?

9

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CleanupStagingFolderUntilPercent<UInt32>

Specifies a percent value from 10 to 80. The default value is 60.

After the DFS Replication service starts cleanup of the staging folder, it continues to delete the oldest files until the folder size reaches this percentage of the staging folder quota.


Aliases

none

Required?

false

Position?

10

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies an array of names of replication member computers. The cmdlet modifies membership settings for these member computers. You can use a comma separated list and the wildcard character (*). If you do not specify this parameter, the cmdlet modifies settings for the current computer.


Aliases

MemberList,MemList

Required?

false

Position?

1

Default Value

[local computer]

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-DebugLogPath<String>

Specifies a folder path for DFS Replication debug logs. The default location for the logs is %SystemRoot%\Debug. If you specify a custom location for logs by using this parameter, select a drive that DFS Replication does not use for replication. Selecting a drive that DFS Replication does not use for replication minimizes the impact of logging on replication performance.


Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DebugLogSeverity<UInt32>

Specifies a severity level for debug log entries. The acceptable values for this parameter are: 

-- 1 - Write log header information only.
-- 2 - Write errors and header information.
-- 3 - Write warning, error, and header information.
-- 4 - Write informational, warning, error, and header information.
-- 5 - Write trace, informational, warning, error, and header information.
The default value on a DFS Replication computer is 4. If you increase the severity, performance can suffer. Use a higher severity level only for troubleshooting. If you decrease the severity, performance increases slightly but you might lose information necessary to troubleshoot issues and lose root cause information.


Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DisableDebugLog<Boolean>

Indicates whether to disable debug logging. If you disable debug logging, performance increases slightly but you might lose information necessary to troubleshoot issues and lose root cause information.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaximumDebugLogFiles<UInt32>

Specifies the number of debug log files to keep. The acceptable values for this parameter are:  integers from zero (0) to 100,000. By default, DFS Replication stores 1000 log files. A larger value can degrade performance.


Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaximumDebugLogMessages<UInt32>

Specifies the number of messages to write in each debug log file. The acceptable values for this parameter are:  integers from 1000 to 4294967295. The default value is 200,000.


Aliases

none

Required?

false

Position?

7

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RPCPort<UInt32>

Specifies a static TCP port for the DFS Replication service to listen on for the Remote Procedure Call (RPC) protocol. The acceptable values for this parameter are:  integers from 1024 to 65535. By default, DFS Replication listens on a dynamic port. Specify a value of zero (0) or $Null for DFS Replication to listen on a dynamic port.

Microsoft recommends a dynamic port. You might need to specify a static port to accommodate a firewall.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UnexpectedAutoRecovery<Boolean>

Indicates whether to set the value for the registry key named StopReplicationAutoRecovery to zero (0) or one (1). A value of zero allows the server to automatically recover after it shuts down incorrectly or hardware fails. Specify a value of $False to set this registry value to one (1). The default value is zero.

When a server shuts down incorrectly and recovers automatically, the database must be validated. Setting the value to one allows you to perform other recovery, backup, or troubleshooting options before resuming replication.

The recommended value for this parameter is $True.


Aliases

none

Required?

false

Position?

8

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • string

Outputs

The output type is the type of the objects that the cmdlet emits.

  • DfsrServiceConfiguration

Examples

Example 1: Configure a computer to use a dynamic RPC port

This command configures the local computer to use a dynamic RPC port for DFS Replication. A value of zero (0) or $Null for the RPCPort parameter configures the computer to use a dynamic port.


PS C:\> Set-DfsrServiceConfiguration -RPCPort 0
ComputerName                      : SRV01
RPCPort :
DynamicRPCPort : True
DisableDebugLog : False
MaximumDebugLogFiles : 1000
DebugLogPath : C:\Windows\debug
DebugLogSeverity : 4
MaximumDebugLogMessages : 200000
UnexpectedAutoRecovery : False
CleanupStagingFolderAtPercent : 90
CleanupStagingFolderUntilPercent : 60
CleanupConflictFolderAtPercent : 90
CleanupConflictFolderUntilPercent : 60

Example 2: Configure all members to log messages with specific severity

This command configures all members of all replication groups to log messages with a severity of five (5). The command gets all members of all replication groups by using the Get-DfsrMember cmdlet. The command passes these members to the Set-DfsrServiceConfiguration cmdlet by using the pipeline operator. That cmdlet changes the severity level for debug logging to five. The command modifies two member computers. The console displays the two members found, including the new setting for severity.


PS C:\> Get-DfsrMember | Set-DfsrServiceConfiguration -DebugLogSeverity 5
ComputerName                      : SRV01
RPCPort :
DynamicRPCPort : True
DisableDebugLog : False
MaximumDebugLogFiles : 1000
DebugLogPath : C:\Windows\debug
DebugLogSeverity : 5
MaximumDebugLogMessages : 200000
UnexpectedAutoRecovery : False
CleanupStagingFolderAtPercent : 90
CleanupStagingFolderUntilPercent : 60
CleanupConflictFolderAtPercent : 90
CleanupConflictFolderUntilPercent : 60

ComputerName : SRV02
RPCPort :
DynamicRPCPort : True
DisableDebugLog : True
MaximumDebugLogFiles : 1000
DebugLogPath : C:\Windows\debug
DebugLogSeverity : 5
MaximumDebugLogMessages : 200000
UnexpectedAutoRecovery : False
CleanupStagingFolderAtPercent : 90
CleanupStagingFolderUntilPercent : 60
CleanupConflictFolderAtPercent : 90
CleanupConflictFolderUntilPercent : 60

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.