編集

次の方法で共有


Reset-StorageReliabilityCounter

Resets storage reliability counters for a disk.

Syntax

Reset-StorageReliabilityCounter
     -PhysicalDisk <CimInstance>
     [-CimSession <CimSession[]>]
     [-ThrottleLimit <Int32>]
     [-AsJob]
     [-PassThru]
     [<CommonParameters>]
Reset-StorageReliabilityCounter
     -Disk <CimInstance>
     [-CimSession <CimSession[]>]
     [-ThrottleLimit <Int32>]
     [-AsJob]
     [-PassThru]
     [<CommonParameters>]
Reset-StorageReliabilityCounter
     -InputObject <CimInstance[]>
     [-CimSession <CimSession[]>]
     [-ThrottleLimit <Int32>]
     [-AsJob]
     [-PassThru]
     [<CommonParameters>]

Description

The Reset-StorageReliabilityCounter cmdlet resets the storage reliability counters to zero for a virtual disk or physical disk. The cmdlet resets the following storage reliability counters for I/O operations: read latency, write latency, and flush latency. If an unexpected issue with a disk or driver causes high latency, use this cmdlet to discount the sharp rise in latencies when you monitor I/O performance.

Examples

Example 1: Reset the reliability counters for two physical disks

PS C:\> $Counter1 = Get-StorageReliabilityCounter -PhysicalDisk (Get-PhysicalDisk "PhysicalDisk01")
PS C:\> $Counter2 = Get-StorageReliabilityCounter -PhysicalDisk (Get-PhysicalDisk "PhysicalDisk02")
PS C:\> Reset-StorageReliabilityCounter -InputObject $Counter1, $Counter2

The first command gets the storage reliability counters for the physical disk named PhysicalDisk01, and stores the counters in the $Counter1 variable.

The second command gets the storage reliability counters for the physical disk named PhysicalDisk02, and stores the counters in the $Counter2 variable.

The last command resets the storage reliability counters for the physical disks stored in $Counter1 and $Counter2.

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

-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

-Disk

Specifies the Disk for which to reset reliability counters. To obtain a Disk object, use the Get-Disk cmdlet.

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

-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

-PhysicalDisk

Specifies the physical disk for which to reset reliability counters. To obtain a PhysicalDisk object, use the Get-PhysicalDisk 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

Inputs

CimInstance

You can use the pipeline operator to pass an arrary of MSFT_StorageReliabilityCounter objects to the InputObject parameter.

Outputs

CimInstance

This cmdlet outputs an array of objects that represent storage reliability counter data.

Notes

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