Remove-DfsReplicatedFolder

Remove-DfsReplicatedFolder

Removes a replicated folder from a replication group.

Syntax

Parameter Set: Default
Remove-DfsReplicatedFolder [-GroupName] <String[]> [-FolderName] <String[]> [[-Force]] [[-DomainName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-DfsReplicatedFolder cmdlet removes replicated folders from a replication group. Replicated folders are logical arrangements of replication that do not contain computer-specific settings.

When you remove a replicated folder, the DFS Replication (DSFR) service cannot replicate the folder. This operation does not delete any replicated file data. Use this cmdlet only when you decommission a replicated folder.

Parameters

-DomainName<String>

Specifies the NetBIOS name or fully qualified domain name (FQDN) for the Active Directory Domain Service (AD DS) domain that contains the replication group. If you do not specify this parameter, the cmdlet uses the domain of the current user.

Aliases

none

Required?

false

Position?

101

Default Value

[Current Domain]

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FolderName<String[]>

Specifies an array of names of replicated folders. You can use a comma separated list and the wildcard character (*). If you do not specify this parameter, the cmdlet gets all replicated folders.

Aliases

RF,RfName

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

true

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-GroupName<String[]>

Specifies an array of names of replication groups. You can use a comma separated list and the wildcard character (*).

Aliases

RG,RgName

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

true

-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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

  • Microsoft.DistributedFileSystemReplication.DfsReplicationGroup, string

Outputs

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

  • [none]

Examples

Example 1: Remove a replicated folder

This command removes the replicated folder RF22 and its associated memberships from the replication group named RG11.

PS C:\> Remove-DfsReplicatedFolder -GroupName "RG11" -FolderName "RF22"

Example 2: Remove all replicated folders associated with a replication group

This command removes all replicated folders and their associated memberships from the replication group named RG11. The Force parameter specifies that the cmdlet does not prompt you to confirm that you want to remove each replicated folder.

PS C:\> Remove-DfsReplicatedFolder -GroupName "RG11" -FolderName * -Force

Get-DfsReplicatedFolder

Set-DfsReplicatedFolder

New-DfsReplicatedFolder