編輯

共用方式為


Set-ResiliencySetting

Modifies the properties of the specified resiliency setting name.

Syntax

Set-ResiliencySetting
   -Name <String[]>
   -StoragePool <CimInstance>
   [-NumberOfDataCopiesDefault <UInt16>]
   [-PhysicalDiskRedundancyDefault <UInt16>]
   [-NumberOfColumnsDefault <UInt16>]
   [-AutoNumberOfColumns]
   [-InterleaveDefault <UInt64>]
   [-NumberOfGroupsDefault <UInt16>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]
Set-ResiliencySetting
   -UniqueId <String[]>
   [-NumberOfDataCopiesDefault <UInt16>]
   [-PhysicalDiskRedundancyDefault <UInt16>]
   [-NumberOfColumnsDefault <UInt16>]
   [-AutoNumberOfColumns]
   [-InterleaveDefault <UInt64>]
   [-NumberOfGroupsDefault <UInt16>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]
Set-ResiliencySetting
   -InputObject <CimInstance[]>
   [-NumberOfDataCopiesDefault <UInt16>]
   [-PhysicalDiskRedundancyDefault <UInt16>]
   [-NumberOfColumnsDefault <UInt16>]
   [-AutoNumberOfColumns]
   [-InterleaveDefault <UInt64>]
   [-NumberOfGroupsDefault <UInt16>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [<CommonParameters>]

Description

The Set-ResiliencySetting cmdlet modifies the properties of the specified resiliency setting name. For example, the user can specify that when creating any new virtual disk using the resiliency setting named Mirror, that the default interleave value would be 128K, or to define the default number of columns to use when creating a Simple (stripe without parity) virtual disk.

Examples

EXAMPLE 1

PS C:\>Set-ResiliencySetting -Name "Mirror" -StoragePool (Get-StoragePool -FriendlyName "CompanyData") -NumberofColumnsDefault 8 -NumberofDataCopies 2

This example sets the default number of columns to eight on virtual disks that use the Mirror setting, with the number of data copies set to two, indicating a two-way mirror, instead of a three-way mirror. The command uses the Get-StoragePool cmdlet to obtain the storage pool that has the friendly name CompanyData as a value for the StoragePool parameter. A two-way mirror with eight columns requires 16 physical disks to create.

Parameters

-AsJob

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

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

-AutoNumberOfColumns

Indicates whether the provider automatically determines the best possible column count for a resiliency setting on a storage pool. The value ranges are:

  • Mirror. The minimum is two for two-way mirror or three for three-way mirror. The maximum is eight times the number of data copies.
  • Parity. The minimum is three for single parity and seven for dual parity. The maximum is eight for single parity and 17 for dual parity.
  • Simple. The minimum is one. The maximum is eight.
Type:SwitchParameter
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

-InputObject

Specifies the input object that is used in a pipeline command.

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

-InterleaveDefault

Specifies the default interleave value to use. The interleave value represents the number of bytes that is written to a single physical disk. Therefore, Interleave * NumberOfColumns yields the size of one stripe of user data.

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

-Name

Specifies the name of an object or setting. The acceptable values for this parameter are:simple, mirror, or parity.

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

-NumberOfColumnsDefault

Specifies the default number of columns to create.

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

-NumberOfDataCopiesDefault

Specifies the default number of data copies to create.

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

-NumberOfGroupsDefault

Specifies the default number of groups used by Local Reconstruction Coding (LRC) with a dual parity virtual disk. We recommend omitting this parameter and using the defaults.

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

-PassThru

Sends items from the interactive window down the pipeline as input to other cmdlets. By default, this cmdlet does not generate any output.

To send items from the interactive window down the pipeline, click to select the items and then click OK. Shift-click and Ctrl-click are supported.

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

-PhysicalDiskRedundancyDefault

Specifies the default number to use for the physical disk redundancy value.

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

-StoragePool

Accepts a StoragePool object as input. The Storage Pool CIM object is exposed by the Get-StoragePool cmdlet.

Type:CimInstance
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-UniqueId

Specifies an ID used to uniquely identify a Disk object in the system. The ID persists through restarts.

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

Inputs

CimInstance

You can use the pipeline operator to pass an MSFT_ResiliencySetting object to the InputObject parameter.

CimInstance

You can use the pipeline operator to pass an MSFT_StoragePool object to the StoragePool parameter.

Outputs

CimInstance

This cmdlet generates an object that represents resiliency settings if you specify the PassThru parameter.

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).