Get-DfsrPreservedFiles

적용 대상: Windows 10, Windows Server Technical Preview

Get-DfsrPreservedFiles

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

구문

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

자세한 설명

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.

매개 변수

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

별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

True (ByValue, ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

  • String

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

  • Microsoft.DistributedFileSystemReplication.DfsrPreservedEntry

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:\RF01. 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*"

관련 항목

Restore-DfsrPreservedFiles