PowerShell 技能连载 - 检测存储问题

在 Windows 10 和 Windows Server 2016 中,PowerShell 可以访问存储可靠性数据,这样您就可以发现其中一个附加的存储驱动器是否有问题。这需要管理员特权来执行:

1
2
3
4
5
6
PS> Get-PhysicalDisk | Get-StorageReliabilityCounter

DeviceId Temperature ReadErrorsUncorrected Wear PowerOnHours
-------- ----------- --------------------- ---- ------------
0 0
1 0

要查看所有可用信息,请使用 Select-Object

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
PS> Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object -Property *


(...)
DeviceId : 0
FlushLatencyMax : 104
LoadUnloadCycleCount :
LoadUnloadCycleCountMax :
ManufactureDate :
PowerOnHours :
ReadErrorsCorrected :
ReadErrorsTotal :
ReadErrorsUncorrected :
ReadLatencyMax : 1078
StartStopCycleCount :
StartStopCycleCountMax :
Temperature : 1
TemperatureMax : 1
Wear : 0
WriteErrorsCorrected :
WriteErrorsTotal :
WriteErrorsUncorrected :
WriteLatencyMax : 1128
(...)
FlushLatencyMax :
LoadUnloadCycleCount :
LoadUnloadCycleCountMax :
ManufactureDate :
PowerOnHours :
ReadErrorsCorrected :
ReadErrorsTotal :
ReadErrorsUncorrected :
ReadLatencyMax : 46
StartStopCycleCount :
StartStopCycleCountMax :
Temperature : 0
TemperatureMax : 0
Wear : 0
WriteErrorsCorrected :
WriteErrorsTotal :
WriteErrorsUncorrected :
WriteLatencyMax :
PSComputerName :
(...)

详情和返回数据的数量取决于您的存储制造商和您的驱动器。

PowerShell 技能连载 - 检测存储问题

http://blog.vichamp.com/2019/09/11/detecting-storage-issues/

作者

吴波

发布于

2019-09-11

更新于

2022-07-06

许可协议

评论