Hyper-V: Unhealthy Storage Volume(s) List
submitted
E
Erik Zwep
The current built-in metric in Liongard only displays the drive letter. However, some volumes do not have a drive letter, resulting in no output for these volumes in this metric. With this metric, you can view both the drive letter and the DrivePath, enabling retrieval using Get-Volume.
Host.Volumes[?HealthStatus!=
Healthy
].{DrivePath: join(': ', [DriveLetter || '-', Path || '-'])}[].DrivePath || to_array(-
) | join(,
, @)E
Erik Zwep
With this metric, you can also retrieve the HealthStatus and OperationalStatus.
Host.Volumes[?HealthStatus!=
Healthy
].{DrivePath: join(' - ', [join(': ', [DriveLetter || '-', Path || '-']), HealthStatus || '-', OperationalStatus || '-'])}[].DrivePath || to_array(-
) | join(,
, @)