Get-DfsrPreservedFiles

Get-DfsrPreservedFiles

Gets a list of files and folders that DFS Replication previously preserved.

Sintaxis

Parameter Set: Default
Get-DfsrPreservedFiles [-Path] <String> [ <CommonParameters>]

Descripción detallada

The Get-DfsrPreservedFiles cmdlet gets a list of preserved files and folders. The Distributed File System (DFS) Replication service preserves the following kinds of files and folders:

-- Conflicted. If users make changes to the same file on multiple servers before replication converges, a file might conflict with the current version. DFS Replication preserves previous conflicting versions of the file.
-- Deleted. When a member computer deletes a replicated file, other members also remove that file. Depending on membership settings, computers can preserve deleted files. To modify whether a member computer preserves deleted files, use the Set-DfsrMembership cmdlet.
-- Preexisting. If DFS Replication overwrites files during its initial synchronization, DFS Replication preserves those files.

For all three types, DFS Replication moves the files and folders to <replicated folder>\DfsrPrivate\ConflictsAndDeleted or <replicated folder>\DfsrPrivate\Preexisting. DFS Replication records these files in a manifest, either ConflictAndDeletedManifest.xml or PreexistingManifest.xml, as appropriate. Specify the ConflictAndDeletedManifest.xml manifest to view conflicted and deleted files and folders. Specify the PreexistingManifest.xml manifest to view preexisting files and folders. You can use the Restore-DfsrPreservedFiles cmdlet to restore files and folders.

Parámetros

-Path<String>

Specifies the path of a manifest. By default, the manifest files exist in the <Replicated Folder>\DfsrPrivate folder. Specify ConflictAndDeletedManifest.xml to view conflicted and deleted files. Specify PreexistingManifest.xml to view preexisting files.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

true

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • string

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.DistributedFileSystemReplication.DfsrPreservedEntry

Ejemplos

Example 1: Get conflicted and deleted files and folders for a replicated folder

This command gets a list of conflicted and deleted files and folders for the replicated folder C:\RF1. The command specifies the manifest for that replicated folder. The console displays the file name and other data.

PS C:\> Get-DfsrPreservedFiles -Path "C:\RF01\DfsrPrivate\ConflictAndDeletedManifest.xml"

Example 2: Get preexisting files for a replicated folder

This command gets a list of preexisting files and folders for the replicated folder C:\RF01. The console displays the file name and other data.

PS C:\> Get-DfsrPreservedFiles -Path "C:\RF01\DfsrPrivate\PreExistingManifest.xml"

Example 3: Look for conflicting or deleted files by using a name

This command looks for conflicting or deleted files that have a name that contains the string canary. The command gets the preserved files recorded in the specified manifest. The command then passes those files to the Where-Object cmdlet by using the pipeline operator. That cmdlet passes files that match the criteria back to the console. For more information, type Get-Help Where-Object.

In this example, the command finds a file, named canary.bmp. You could use the Restore-DfsrPreservedFiles to restore this file.

PS C:\> Get-DfsrPreservedFiles -Path "C:\RF01\DfsrPrivate\ConflictAndDeletedManifest.xml" | Where-Object Path -like "*canary*"

Temas relacionados

Restore-DfsrPreservedFiles