PowerShell Get-StorageQoSflow: Which VM belongs to which storage QoS policy?


As Get-StorageQoSflow does not list the friendly name of the QoS policy here is a small snippet on how to do this:
(using PowerShell’s Expression to cross call another cmdlet to resolve the PolicyId)

PS C:\> Get-StorageQoSflow | Sort-Object InitiatorName | ft InitiatorName, @{Expression={(Get-StorageQosPolicy -PolicyId $_.PolicyId).Name };Label="Policy"}, Status, MinimumIOPs, MaximumIOPs, StorageNodeIOPs, @{Expression={$_.FilePath.Substring($_.FilePath.LastIndexOf('\')+1)};Label="File"} –AutoSize

results:

InitiatorName     Policy   Status MinimumIops MaximumIops StorageNodeIOPs File
-------------     ------   ------ ----------- ----------- --------------- ----
sc-db01           SweepQoS     Ok           0         400               0 SC-DB01A-OS.VHDX
sc-db01           SweepQoS     Ok           0         400               0 SC-DB01A-OS.VHDX
sc-db01b          SweepQoS     Ok           0         400               0 SC-DB01B-OS.VHDX
sc-db01b          SweepQoS     Ok           0         400               0 SC-DB01B-OS.VHDX
vm-base-FTS-HV1-1 SilverVM     Ok           0         500               0 VM-BASE-FTS-HV1-1.VHDX
vm-base-FTS-HV2-1 SweepQoS     Ok           0         400               1 VM-BASE-FTS-HV2-1.VHDX
vm-base-FTS-HV3-1 SweepQoS     Ok           0         400               0 VM-BASE-FTS-HV3-1.VHDX
vm-base-FTS-HV4-1 SweepQoS     Ok           0         400               0 VM-BASE-FTS-HV4-1.VHDX

hth,
Bernhard

Comments (0)

Skip to main content