Edit

Share via


Remove-DfsReplicationGroup

Removes a replication group.

Syntax

Default (Default)

Remove-DfsReplicationGroup
    [-GroupName] <String[]>
    [-RemoveReplicatedFolders]
    [-Force]
    [[-DomainName] <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-DfsReplicationGroup cmdlet removes a replication group.

When you remove a replication group, you remove the group from Active Directory, and you also delete all associated aspects of the Distributed File System (DFS) Replication topology for that replication group, such as members, memberships, and connections. All replication halts on all members. This operation does not delete any replicated file data or private data. Use this command only when you decommission a replication group.

Examples

Example 1: Remove a replication group

PS C:\> Remove-DfsReplicationGroup -GroupName "RG01"
Performing this operation will remove the replication group "RG01" and the subscriptions members have to this
replication group. Are you sure you want to continue to remove this replication group? [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y

This command removes the replication group named RG01 from the current ___domain.

Example 2: Remove replication groups using a wildcard

PS C:\> Remove-DfsReplicationGroup -GroupName "RG*" -RemoveReplicatedFolders -Domain "corp.contoso.com"
Performing this operation will remove the replication group "RG01" and the subscriptions members have to this
replication group. Are you sure you want to continue to remove this replication group? [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Performing this operation will remove the replication group "RG02" and the subscriptions members have to this
replication group. Are you sure you want to continue to remove this replication group? [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Performing this operation will remove the replication group "RG03" and the subscriptions members have to this
replication group. Are you sure you want to continue to remove this replication group? [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

This command removes all replication groups that include the pattern RG* in ___domain corp.contoso.com, even if the groups include replicated folders.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:100
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation. Use this parameter for scripted removal of replication groups.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GroupName

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

If the replication group contains any replicated folders, you must specify the RemoveReplicatedFolders switch parameter.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:RG, RgName

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-RemoveReplicatedFolders

Indicates that the cmdlet removes any replicated folders belonging to the replication group prior to deleting the replication group.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Outputs

None