#PSTip Setting VM Bandwidth Management QoS in Hyper-V using PowerShell

Note: This tip requires PowerShell 3.0 or above.

The bandwidth utilized by a VM (QoS = Quality of Service ) can be controlled via special parameters of the virtual network card for a given VM. This settings control the amount of bandwidth (minimum/maximum) a VM can use on the virtual switch and is available on a per network adapter basis in each virtual machine.

Bandwidth minimum guarantees the amount of bandwidth reserved and Bandwidth maximum caps the amount of bandwidth a VM can consume (in bits per second). To disable this feature, set it to 0 (zero).

This example sets the maximum bandwidth for VM1 to 200 Mbps

Set-VMNetworkAdapter -VMName VM1 -MaximumBandwidth 200000000

About the author: Shay Levy

Shay Levy is a Co-founder and editor of the PowerShell Magazine. He is a multiple-year recipient of the Microsoft MVP award, and a Microsoft Certified Trainer (MCT). Shay often covers PowerShell related topics on his blog and you can also follow him on Twitter at @ShayLevy

Related Posts