Share via


New-DfsReplicatedFolder

New-DfsReplicatedFolder

Creates a replicated folder in a replication group.

Syntaxe

Parameter Set: Default
New-DfsReplicatedFolder [-GroupName] <String[]> [-FolderName] <String[]> [[-Description] <String> ] [[-FileNameToExclude] <String[]> ] [[-DirectoryNameToExclude] <String[]> ] [[-DfsnPath] <String> ] [[-CreateDisabledMemberships]] [[-DomainName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Description détaillée

The New-DfsReplicatedFolder cmdlet creates a new replicated folder in a replication group. Replicated folders are logical arrangements of replication that do not contain computer-specific settings.

Paramètres

-CreateDisabledMemberships

Indicates that the any members that you add to the replicated folder have disabled memberships. You do not typically need to set this parameter, because the next step in creating a new replication topology is to create the connections and membership, and then start replication.

Alias

none

Obligatoire ?

false

Position ?

7

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-Description<String>

Specifies a description for the replicated folder.

Alias

none

Obligatoire ?

false

Position ?

3

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-DfsnPath<String>

Specifies the DFS Namespace (DFSN) folder path of the replicated folder.

The DFSN folder path has no effect on replication. This property exists only as a descriptive convenience to administrators and DFS Replication service does not validate the value of this property.

Alias

none

Obligatoire ?

false

Position ?

6

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-DirectoryNameToExclude<String[]>

Specifies an array of names of subfolders that the DSFR service excludes and does not replicate in the replicated folder. You must provide only folder names, not full paths. You can use wildcards.

Alias

DirectoryFilter

Obligatoire ?

false

Position ?

5

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-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.

Alias

none

Obligatoire ?

false

Position ?

101

Valeur par défaut

[Current Domain]

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-FileNameToExclude<String[]>

Specifies an array of names and extensions of files that the DSFR service excludes and does not replicate in the replicated folder. Provide only folder names for this parameter; do not specify full paths. You can use wildcards.

Alias

FileFilter

Obligatoire ?

false

Position ?

4

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

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.

Alias

RF,RfName

Obligatoire ?

true

Position ?

2

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-GroupName<String[]>

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

Alias

RG,RgName

Obligatoire ?

true

Position ?

1

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue, ByPropertyName)

Accepter les caractères génériques ?

false

-Confirm

Votre confirmation sera requise avant l’exécution de l’applet de commande.

Obligatoire ?

false

Position ?

named

Valeur par défaut

false

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-WhatIf

Présente les conséquences éventuelles de l’exécution de l’applet de commande. L’applet de commande n’est pas exécutée.

Obligatoire ?

false

Position ?

named

Valeur par défaut

false

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

<CommonParameters>

Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entrées

Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.

  • Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Sorties

Le type de sortie est le type des objets émis par l’applet de commande.

  • Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

Exemples

Example 1: Create a replicated folder

This command creates a replicated folder named RF26 in the replication group named RG22. The command does not alter the default settings for a replicated folder.

PS C:\> New-DfsReplicatedFolder -GroupName "RG22" -FolderName "RF26"

This command creates a replicated folder named RF26 in the replication group named RG22. The command DfsnPath parameter sets the administrative property for a DFS namespace link path. The cmdlet reminds the administrator that the DFSN path is cosmetic only and is not verified or used by DFS Replication in any way.

PS C:\> New-DfsReplicatedFolder -GroupName "RG22" -FolderName "RF26" -DfsnPath \\corp.contoso.com\public\link1

Example 3: Create a replicated folder that excludes specific file names

This command creates a replicated folder named RF08 in the replication group named RG11. The command specifies that the DFS Replication service exclude file names starting with a tilde (~) character and files that have the extensions .bak, .tmp, and .ned from replication.

PS C:\> New-DfsReplicatedFolder -GroupName "RG11" -FolderName "RF08" -FileNameToExclude "~*, *.bak, *.tmp, *.ned"

Example 4: Create a data distribution replication topology

This example creates a hub and spoke data distribution replication topology.

The first command uses the New-DfsReplicationGroup cmdlet to create a replication group object named Branch Office 1, and passes the object to the New-DfsReplicatedFolder cmdlet by using the pipe operator. The New-DfsReplicatedFolder cmdlet creates a replication folder object named Data Distribution 1, and passes the object to the Add-DfsrMember cmdlet by using the pipe operator. The Add-DfsrMember cmdlet adds the computers named SRV01, SRV02, and SRV03 to the replication group named Branch Office 1.

PS C:\> New-DfsReplicationGroup -GroupName "Branch Office 1" | New-DfsReplicatedFolder -FolderName "Data Distribution 1" | Add-DfsrMember -ComputerName "SRV01","SRV02","SRV03" | Format-Table dnsname,groupname -auto -wrap

The second command creates a bidirectional replication connection between the computer named SRV01 and the computer named SRV02 in the replication group named Branch Office 1.

PS C:\> Add-DfsrConnection -GroupName "Branch Office 1" -SourceComputerName SRV01 -DestinationComputerName SRV02 | Format-Table *name -wrap -auto

The third command creates a bidirectional replication connection between the computer named SRV01 and the computer named SRV03 in the replication group named Branch Office 1.

PS C:\> Add-DfsrConnection -GroupName "Branch Office 1" -SourceComputerName SRV01 -DestinationComputerName SRV03 | Format-Table *name -wrap -auto

The fourth command uses the Set-DfsrMembership cmdlet to configure membership settings for the primary member of the replication group named Branch Office 1. The command specifies that the computer named SRV01 is the primary member of the group. The command sets an appropriate quota size of the staging folder instead of the lower default.

PS C:\> Set-DfsrMembership -GroupName "Branch Office 1" -FolderName "Data Distribution 1" -ContentPath c:\rf1 -ComputerName SRV01 -PrimaryMember $True -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap

The last command uses the Set-DfsrMembership cmdlet to configure membership settings for the members of the replication group named Branch Office 1. The command specifies that the computers named SRV02 and SRV03 are members of the group. The command sets an appropriate quota size of the staging folder instead of the lower default.

PS C:\> Set-DfsrMembership -GroupName "Branch Office 1" -FolderName "Data Distribution 1" -ContentPath c:\rf1 -ComputerName SRV02,SRV03 -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap

Rubriques connexes

Get-DfsReplicatedFolder

Set-DfsReplicatedFolder

Remove-DfsReplicatedFolder