You dont have javascript enabled! Please enable it! Enable RSS On All Virtual Machines Using PowerShell #vRSS #Hyper-V - CHARBEL NEMNOM - MVP | MCT | CCSP | CISM - Cloud & CyberSecurity

Enable RSS on all Virtual Machines using PowerShell #vRSS #Hyper-V

3 Min. Read

In this article, we will show you how to enable RSS on all Hyper-V Virtual Machines using PowerShell.


In Windows Server 2012 R2, Microsoft works to improve networking workloads inside the Virtual Machine, because back in Windows Server 2012 we had a bottleneck inside the Host limited to one Core and a bottleneck inside the VM again limited to one Core, so we need to expand that out and have a Virtual Machine being able to use multiple Cores in the host and inside the VM, therefore Microsoft introduced a new feature in Windows Server 2012 R2 called Virtual Receive Side Scaling (vRSS).

With vRSS, we are now able to turn RSS On inside the VM expanding to multiple Cores and that is used just like would be in the physical Host so you can pretend that the VM is the physical Host, and as soon as you turn on RSS inside the VM, you automatically get spread inside the Host as well, so they introduced logically VMQ to actually spread from 1 Core up to 16 Cores.

If you like to deep dive in VMQ and RSS, here you go 3 part series VMQ Deep Dive.

Enable RSS on Hyper-V Virtual Machines

Let’s see now vRSS in action.

I want to point out that the demoing VM that I am using has 8 Virtual Processors with one vNIC, and the host has 4 physical NICs 1GbE teamed with one CPU socket Quad Core.

With RSS turned off you can see that the network workload is using 1 Core only and the maximum network throughput is around 2Gbps.



So in order to eliminate that bottleneck of 1 CPU with vRSS you jump into your VM setting the network adapter RSS to true, and now RSS is enabled on that machine, and here is the result :) 

PS C:\Set-NetAdapterRss –Name * -Enabled $true

As you can see immediately the network throughput went from 2Gbps to 3.3Gbps, and all 8 VPs are active now.


The vRSS is able to expand the throughput to the VM from around 3Gbps all the way to 10Gbps on 10Gbps Network Cards, Microsoft confirmed that it can go higher on throughput with 40Gpbs cards but the result is very dependent on the CPU of the server.

The question that might come up… What if I have many Virtual Machines on that host, and I want to turn on RSS automatically on all VMs instead of logging into each VM and enabling RSS?

The answer is WMI and PowerShell!

With the help of well-respected and fellow MVP Yusuf Ozturk @, I modified the following script that retrieves all VMs guest hostnames from the Host and turns on RSS automatically J  it’s required to have Hyper-V 2012 R2 or later.

function Get-VMGuestInfo {
    [CmdletBinding(SupportsShouldProcess = $true)]
    param (
            Mandatory = $true,
            HelpMessage = 'Virtual Machine Name')

            Mandatory = $false,
            HelpMessage = 'Hyper-V Host Name')
        $HyperVHost = "localhost",

            Mandatory = $false,
            HelpMessage = 'Debug Mode')
        [switch]$DebugMode = $false

    # Enable Debug Mode
    if ($DebugMode) {
        $DebugPreference = "Continue"
    else {
        $ErrorActionPreference = "silentlycontinue"

    $VMState = (Get-VM -ComputerName $HyperVHost -Name $VMName).State
    if ($VMState -eq "Running") {
        filter Import-CimXml {
            $CimXml = [Xml]$_
            $CimObj = New-Object -TypeName System.Object
            foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY")) {

                if ($CimProperty.Name -eq "Name" -or $CimProperty.Name -eq "Data") {
                    $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE

        $VMConf = Get-WmiObject -ComputerName $HyperVHost -Namespace "root\virtualization\v2" -Query "SELECT * FROM Msvm_ComputerSystem WHERE ElementName like '$VMName' AND caption like 'Virtual%' "
        $KVPData = Get-WmiObject -ComputerName $HyperVHost -Namespace "root\virtualization\v2" -Query "Associators of {$VMConf} Where AssocClass=Msvm_SystemDevice ResultClass=Msvm_KvpExchangeComponent"
        $KVPExport = $KVPData.GuestIntrinsicExchangeItems
        if ($KVPExport) {

            # Get KVP Data
            $KVPExport = $KVPExport | Import-CimXml

            # Get Guest Hostname
            $VMHostname = ($KVPExport | where { $_.Name -eq "FullyQualifiedDomainName" }).Data
        else {
            $VMHostname = "Unknown"
    else {
        $VMHostname = "Unknown"

    $Properties = New-Object Psobject
    $Properties | Add-Member Noteproperty VMHostname $VMHostname
    Write-Output $Properties

$VMs = Get-VM -ComputerName $HyperVHost
foreach ($VM in $VMs) {
    $VMName = $VM.Name
    $VMHostName = (Get-VMGuestInfo -VMName $VMName -HyperVHost $HyperVHost).VMHostName
    $Output = $VMHostName
    Add-Content -Value $Output -Path C:\Temp\VMs.txt

# Get Domain Credentials
$cred = get-credential "Domain\User"

# Turn on RSS on all running Guests
Invoke-Command -ComputerName (Get-Content C:\Temp\VMs.txt) -Credential $cred -ScriptBlock { Set-NetAdapterRss –Name * -Enabled $true }

Give it a try and see how it works.

Learn more

Do you want to learn about Windows Server Hyper-V, I highly encourage you to check Windows Server Hyper-V Cookbook for in-depth details about Hyper-V and automation tasks.

Enjoy your day!


Photo of author
About the Author:
Charbel Nemnom
Charbel Nemnom is a Senior Cloud Architect with 21+ years of IT experience. As a Swiss Certified Information Security Manager (ISM), CCSP, CISM, Microsoft MVP, and MCT, he excels in optimizing mission-critical enterprise systems. His extensive practical knowledge spans complex system design, network architecture, business continuity, and cloud security, establishing him as an authoritative and trustworthy expert in the field. Charbel frequently writes about Cloud, Cybersecurity, and IT Certifications.

Live Migration Comparison over TCP/IP, Compression, and SMB MultiChannel with Hyper-V 2012 R2

Build a Step by Step Hyper-V and VMM Lab with PowerShell


4 thoughts on “Enable RSS on all Virtual Machines using PowerShell #vRSS #Hyper-V”

Leave a comment...

  1. Hello Dan, thanks for the comment!
    Please note that I’ve updated the article, you should be able to copy the script now.
    Let me know how it works for you.

  2. Thanks, Dan, yes the script will work on Windows Server 2019 Hyper-V.
    Please note that if you have Windows Server 2016 VMs and later running on Windows Hyper-V 2019, then vRSS should be enabled by default and you don’t need to run the script.
    Hope it helps!

Let us know what you think, or ask a question...