編輯

共用方式為


Set-DedupVolume

Changes data deduplication settings on one or more volumes.

Syntax

Set-DedupVolume
   [-VolumeId <String[]>]
   [-OptimizeInUseFiles]
   [-OptimizePartialFiles]
   [-NoCompress <Boolean>]
   [-Verify <Boolean>]
   [-MinimumFileAgeDays <UInt32>]
   [-MinimumFileSize <UInt32>]
   [-ChunkRedundancyThreshold <UInt32>]
   [-ExcludeFolder <String[]>]
   [-ExcludeFileType <String[]>]
   [-ExcludeFileTypeDefault <String[]>]
   [-NoCompressionFileType <String[]>]
   [-InputOutputScale <UInt32>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]
Set-DedupVolume
   [-Volume] <String[]>
   [-OptimizeInUseFiles]
   [-OptimizePartialFiles]
   [-NoCompress <Boolean>]
   [-Verify <Boolean>]
   [-MinimumFileAgeDays <UInt32>]
   [-MinimumFileSize <UInt32>]
   [-ChunkRedundancyThreshold <UInt32>]
   [-ExcludeFolder <String[]>]
   [-ExcludeFileType <String[]>]
   [-ExcludeFileTypeDefault <String[]>]
   [-NoCompressionFileType <String[]>]
   [-InputOutputScale <UInt32>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]
Set-DedupVolume
   -InputObject <CimInstance[]>
   [-OptimizeInUseFiles]
   [-OptimizePartialFiles]
   [-NoCompress <Boolean>]
   [-Verify <Boolean>]
   [-MinimumFileAgeDays <UInt32>]
   [-MinimumFileSize <UInt32>]
   [-ChunkRedundancyThreshold <UInt32>]
   [-ExcludeFolder <String[]>]
   [-ExcludeFileType <String[]>]
   [-ExcludeFileTypeDefault <String[]>]
   [-NoCompressionFileType <String[]>]
   [-InputOutputScale <UInt32>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]

Description

The Set-DedupVolume cmdlet changes data deduplication settings on one or more volumes.

Examples

Example 1: Set the exclude folders on a volume

Set-DedupVolume -Volume "F:" -ExcludeFolder "F:\temp","F:\SQL"

This command sets the root folders under which all files are skipped during data deduplication. The ExcludeFolder parameter specifies that the data deduplication engine processes the files in all of the folders on volume F: except for files in the Temp folder and the SQL folder. If you exclude folders that contain previously optimized files, this command does not unoptimize those files. You have to manually unoptimize any previously optimized files specified by ExcludeFolder.

Note if the ExcludeFolder already contains optimized files, those optimized files are not automatically unoptimized by this command. Any previously optimized files under the ExcludeFolder will need to be manually unoptimized.

Example 2: Set the minimum file age on a volume

Set-DedupVolume -Volume "E:" -MinimumFileAgeDays 10

This command sets the number of days since the file was created before the deduplication engine optimizes the file. The MinimumFileAgeDays parameter specifies that the data deduplication engine processes the files in all of the folders on volume E: that were created at least 10 days ago.

Example 3: Set the chunk redundancy threshold on a volume

Set-DedupVolume -Volume "D:" -MinimumFileAgeDays 15 -ChunkRedundancyThreshold 50

This command sets the number of identical chunks of data that the deduplication engine encounters during deduplication before the server creates a redundant copy of the data chunk. The MinimumFileAgeDays parameter specifies that the data deduplication engine processes the files in all of the folders on volume D: that were created at least 15 days ago. The ChunkRedundancyThreshold parameter specifies that if the data deduplication engine discovers 50 chunks of identical data, it makes one redundant copy as a safeguard.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet.

For more information about Windows PowerShell background jobs, see about_Jobs.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ChunkRedundancyThreshold

Specifies the number of identical chunks of data that the deduplication engine encounters before the server creates a redundant copy of the data chunk. This increases the reliability of the server by adding redundancy to the most referenced chunks of data.

Deduplication detects corruptions and the deduplication scrubbing job restores the corrupted chunks from a redundant copy, if it is available. The default value is 100. The minimum value that you can set is 20. A low value for the ChunkRedundancyThreshold parameter reduces the effectiveness of data deduplication by creating more redundant copies of a chunk, and consumes more memory and disk space.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExcludeFileType

Specifies an array of extension types that the deduplication engine excludes from data deduplication and optimization. Specify comma-separated values that are not preceded with a period (.). When you change this setting, you override the existing values.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExcludeFileTypeDefault

Specifies an array of extension types, as strings, that the server does not optimize.

The Enable-DedupVolume cmdlet modifies this behavior, depending on the value of the UsageType parameter. If you use the current parameter to modify this behavior, and then run Enable-DedupVolume again, that cmdlet overrides your changes.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExcludeFolder

Specifies an array of names of root folders under which all files are skipped during data deduplication. Full paths are accepted, however mount points are ignored since the mount point can change after configuration. When you change this setting, you override the existing values.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type:CimInstance[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InputOutputScale

Specifies the level of input/output parallelization during optimization for this volume. The acceptable values for this parameter are: integers from 0 to 36. The default value of 0 sets the system to automatically select an InputOutputScale value based on the size of the volume to deduplicate.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MinimumFileAgeDays

Number of days after the file is created before the file is considered to be in-policy for optimization.

The Default and HyperV UsageType set this value to 3 to maximize performance on hot or recently created files. You may want to modify this if you want Data Deduplication to be more aggressive or if you do not care about the extra latency associated with deduplication.

Type:UInt32
Aliases:MinimumFileAge
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MinimumFileSize

Specifies the minimum size threshold, in bytes, for files that are optimized. The deduplication engine does not optimize files that do not meet the minimum threshold.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NoCompress

Indicates whether or not the server compresses data after deduplication. Compression uses more processor cycles but provides additional space savings.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NoCompressionFileType

Specifies an array of file types that the deduplication engine excludes from compression. These file types are deduplicated but not compressed, typically because the file format is already compressed. Specify comma-separated values that are not preceded with a period (.). When you change this setting, you override the existing values.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OptimizeInUseFiles

Indicates that the server attempts to optimize currently open files. After specifying this parameter, the server may wait up to 15 minutes before it attempts to optimize open files.

Enable-DedupVolume modifies this behavior, depending on the value of the UsageType parameter. If you use the current parameter to modify this behavior, and then run Enable-DedupVolume again, that cmdlet overrides your changes.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-OptimizePartialFiles

Indicates that the server optimizes all files, including portions of files that are old enough, according to the value of the MinimumFileAgeDays parameter.

Enable-DedupVolume modifies this behavior, depending on the value of the UsageType parameter. If you use the current parameter to modify this behavior, and then run Enable-DedupVolume again, that cmdlet overrides your changes.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Verify

Indicates whether the deduplication engine performs a byte-for-byte verification for each duplicate chunk that optimization creates, rather than relying on a cryptographically strong hash. We do not recommend that you use this parameter. Setting this parameter to $True can degrade optimization performance.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Volume

Specifies an array of system volumes. Specify one or more volume IDs, drive letters, or volume GUID paths. For drive letters, use the format D:. For volume GUID paths, use the format \\?\Volume{{GUID}}\. Separate multiple volumes with a comma.

Type:String[]
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VolumeId

Specifies an array of volume IDs.

Type:String[]
Aliases:DeviceId, Path, Id
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String[]

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Outputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

CimInstance