次の方法で共有


Get-DfsrPreservedFiles

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.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue, ByPropertyName)

ワイルドカード文字を許可する

true

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • string

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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

関連トピック

Restore-DfsrPreservedFiles