---
title: How to Enable Accelerated Networking on NICs – Azure Virtual Machine using PowerShell + Excel sheet
description: This article describes how to Enable Accelerated Networking on NICs – Azure Virtual Machine using PowerShell + Excel sheet and how automating processes can save significant amount of time.
image: https://blog.e-zest.com/hubfs/Blog_Files/blog_image05_2x_2560x1334.jpg
---

[![e-Zest logo\_An accion lab company\_Colour](https://blog.e-zest.com/hubfs/images/Logos%20with%20Tagline/Corporate/SVG/e-Zest%20logo_An%20accion%20lab%20company_Colour.svg "e-Zest logo_An accion lab company_Colour")](https://www.e-zest.com/)

- [WORK](https://www.e-zest.com/our-work)
- [SERVICES](https://www.e-zest.com/our-services) 
    - [Product Engineering](https://www.e-zest.com/digital-product-engineering-services)
    - [Enterprise Data Services](https://www.e-zest.com/enterprise-data-services)
    - [Digital Commerce](https://www.e-zest.com/digital-commerce-services)
    - [Digital Operations](https://www.e-zest.com/digital-operations)
    - [Digital Consulting](https://www.e-zest.com/digital-transformation-consulting-services)
    - [Digital Experience Design](https://www.e-zest.com/digital-experience-design)
- [INSIGHTS](https://blog.e-zest.com/)
- [CAREERS](https://www.e-zest.com/careers)
- [ENTERPRISE DATA SERVICES](https://www.e-zest.com/enterprise-data-services)
- [GENERATIVE AI](https://www.e-zest.com/generative-ai)
- [Healthcare](https://healthcare.e-zest.com)
- [Contact Us](https://www.e-zest.com/contact-us)

- ![Elevating Product Engineering with AI and ML](https://blog.e-zest.com/hubfs/Elevating%20Product%20Engineering%20with%20AI%20and%20ML.jpg)

  [BLOGS](https://blog.e-zest.com)
  
  #### Elevating Product Engineering with AI and ML

  As technology evolves and customer choices broaden, there is an increasing ...

  [Read more](https://blog.e-zest.com/elevating-product-engineering-with-ai-and-ml)
- ![e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024](https://blog.e-zest.com/hubfs/e-Zest%20%E2%80%93%20An%20Accion%20Labs%20Company%20-%20Gets%20Recognition%20as%20a%20Contender%20in%20the%20ISG%20Provider%20LensTM%20Study%20on%20Digital%20Engineering%20Services%202024.jpg)

  [NEWS](https://blog.e-zest.com/news)
  
  #### e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024

  We are delighted to announce that e-Zest – An Accion Labs Company has been ...

  [Read more](https://blog.e-zest.com/news/e-zest-an-accion-labs-company-gets-recognition-as-a-contender-in-the-isg-provider-lens-study-on-digital-engineering-services-2024)
- ![e-Zest Solutions supports Digital Pune Mission](https://blog.e-zest.com/hubfs/blog-files/Digital%20Literacy%20Bus%20e-Zest.png)

  [CSR](https://blog.e-zest.com/csr)
  
  #### e-Zest Solutions supports Digital Pune Mission

  **Pune, India:** e-Zest Solutions, a leading digital technology innovation ...

  [Read more](https://blog.e-zest.com/csr/e-zest-solutions-supports-digital-pune-mission)

- [Work](https://www.e-zest.com/our-work)
- [Services](https://www.e-zest.com/our-services)
- [Insights](https://blog.e-zest.com)
- [Careers](https://www.e-zest.com/careers)
- [Enterprise Data](https://www.e-zest.com/enterprise-data-services)
- [Generative AI](https://www.e-zest.com/generative-ai)
- [Innovations](https://www.e-zest.com/innovations)
- [Healthcare](https://healthcare.e-zest.com)
- [About](https://www.e-zest.com/about-us)
- [Contact](https://www.e-zest.com/contact-us)

- [Blog](https://blog.e-zest.com/)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)

- [![Linkedin Icon](https://blog.e-zest.com/hubfs/icons/linkedin_icon_white.svg)](https://www.linkedin.com/company/e-zest-solutions/)
- [![Twitter Icon](https://blog.e-zest.com/hubfs/twitter-logo-silhouette%20(5).svg)](https://twitter.com/ezest)
- [![Facebook Icon](https://blog.e-zest.com/hubfs/facebook-app-logo%20(4).svg)](https://www.facebook.com/61259256638)
- [![Instagram Icon](https://blog.e-zest.com/hubfs/instagram-logo%20(4).svg)](https://www.instagram.com/ezestsolutions/)
- [![Youtube Icon](https://blog.e-zest.com/hubfs/icons/youtube_icon_white.svg)](https://www.youtube.com/user/ezestcorporate)

[![Go to top icon](https://blog.e-zest.com/hubfs/AA%20Assets/top%20button.svg)](https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet#top)

Hit enter to search or ESC to close

Insights

e-Zest members share technology ideas to foster digital transformation.

- [Blog](https://blog.e-zest.com)
- [Whitepaper](https://blog.e-zest.com/whitepaper)
- [Playbook](https://blog.e-zest.com/playbook)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)
- [Innovation](https://blog.e-zest.com/innovation)
- [Healthcare](https://blog.e-zest.com/healthcare)
- [Media Kit](https://www.e-zest.com/media-kit)

# How to Enable Accelerated Networking on NICs – Azure Virtual Machine using PowerShell + Excel sheet

[Sourabh Majali](https://blog.e-zest.com/author/sourabh-majali)  Jul 07, 2023

[Microsoft Azure](https://blog.e-zest.com/topic/microsoft-azure) [NIC](https://blog.e-zest.com/topic/nic) [Powershell](https://blog.e-zest.com/topic/powershell) [Excel Sheet](https://blog.e-zest.com/topic/excel-sheet) [Azure Virtual Machine](https://blog.e-zest.com/topic/azure-virtual-machine) [Network Interface](https://blog.e-zest.com/topic/network-interface)

- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet&title=&summary=&source=>
- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet&text=How%20to%20Enable%20Accelerated%20Networking%20on%20NICs%20–%20Azure%20Virtual%20Machine%20using%20PowerShell%20+%20Excel%20sheet>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet>
- <https://www.instagram.com/ezestsolutions/?u=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet>

Accelerated Networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance. This high-performance path bypasses the host from the Datapath, reducing latency, jitter, and CPU utilization, to be used with the most demanding network workloads on supported VM types.

![How two VMs communicate with and without Accelerated Networking](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/1.png?width=1522&height=629&name=1.png)Source: [https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-overview?tabs=redhat](https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-overview?tabs=redhat)

Prerequisite

1. An Excel sheet filled with VM Name and Resource Group (as shown in later part of blog)
2. PowerShell Full access
3. Contributor access to your Azure account

Steps to Enable Accelerated Networking Manually: 

1. **Go to Azure portal -\> Virtual Machines -\> Select your VM -\> Stop**
2. **Networking -\> Your NIC**
   
   **![Enable Accelerated Networking Manually](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/2.png?width=700&height=335&name=2.png)**
3. **“Edit Accelerated Networking” -\> Enabled**
   
   ![Edit Accelerated Networking](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/3.png?width=1800&height=376&name=3.png)
4. Save + Start VM
   
   ![Save + Start VM](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/4.png?width=1187&height=343&name=4.png)

Now, let’s imagine the same steps to be performed for 200 machines. Isn’t that time-consuming? Also, it might lead to some errors in the process of the task. 

To resolve this issue, we can utilize PowerShell and Excel sheets.

1. **Steps to Enable Accelerated Networking using PowerShell + Excel sheet**
2. Here, I have a sheet with VM Name and Resource Group Name to enable accelerated networking on.
   
   ![Exampale of VM Name and Resource Group Name to enable accelerated networking](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/5.png?width=385&height=201&name=5.png)
3. Login to PowerShell -\> Connect to your Az Account using the following command.  
   Connect-AzAccount
4. Once you are logged in to Azure account -\> Select your Subscription
   
   ![Select Subscription](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/6.png?width=1450&height=243&name=6.png)
5. Once you select your Subscription, you need to import the Excel file into the PS.

#--------------------------Create/Get Excel File---------------------------  
$file = "C:\\Users\\sourabh.majali\\Downloads\\ExcelSheet.xlsx"  
$sheetName = "Sheet1"  
$objExcel = New-Object -ComObject Excel.Application  
$workbook = $objExcel.Workbooks.Open($file)  
$sheet = $workbook.Worksheets.Item($sheetName)  
$objExcel.Visible=$false   
$rowMax = ($sheet.UsedRange.Rows).count   
$rowcustname ,$colcustname = 1,1  
$rowsubid ,$colsubid  = 1,2  
$rowtenantid ,$coltenantid  = 1,3

This selects all the data in your Excel sheet and imports it into your PS script for further use.

The next series of commands is used to loop all the rows and columns of the Excel sheet to fetch the VM Name and their Resource Groups

for($i=1;$i -lt $rowMax;$i++)  
  {  
    $VMName=$sheet.Cells.Item($rowcustname+$i,$colcustname).text  
    $RG=$sheet.Cells.Item($rowcustname+$i,$colcustname+1).text  
    Write-Host "\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_" -ForegroundColor Yellow  
    Write-Host "Checking for machine $VMName...." -ForegroundColor Green  
    $vm=Get-AzVM -Name $VMName -ResourceGroupName $RG  
    $status= (Get-AzVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -  Status).Statuses\[1\].DisplayStatus  
    if($status -ne "VM deallocated")  
    {  
        Write-Host "VM was still running...Stop the machine and retry" -ForegroundColor Red  
        $sheet.Cells.Item($rowcustname+$i,$colcustname+3)= "VM was still running...Stop and retry"  
     }  
    else  
    {  
        Write-Host "$VMName is in Deallocated state...proceeding further..." -ForegroundColor White  
        $nics=$vm.NetworkProfile.NetworkInterfaces  
        foreach($nic in $nics)  
         {  
          Write-Host "Enabling Accelarated Networking on " $nic.Id  
        $GetNICDetails= Get-AzNetworkInterface -ResourceId $nic.Id  
        $GetNICDetails.EnableAcceleratedNetworking = $true  
        try  
        {  
            Write-Host "Saving NIC..." -ForegroundColor White  
            Set-AzNetworkInterface -NetworkInterface $GetNICDetails -AsJob | Wait-Job  
            $sheet.Cells.Item($rowcustname+$i,$colcustname+2)= "Completed"  
        }  
        catch  
        {  
            Write-Host "------Error Found-------" -ForegroundColor Red  
            $sheet.Cells.Item($rowcustname+$i,$colcustname+2)= "Error Found"  
        }  
     }  
    }  
  }  
$outputpath="C:\\Users\\sourabh.majali\\Downloads\\ExcelSheet\_Completed.xlsx"  
$workbook.SaveAs($outputpath)  
$objExcel.Quit()  
#------------------------------------END-------------------------------------------------#

Output

![Output](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/7.png?width=1459&height=699&name=7.png)  
How Script Works?

- The script will check if the machine is in deallocated state or not, if yes, it will proceed further, and if not, it will be marked as“Stop the machine & retry”.
- If there are multiple NICs, the script will loop in all the NICs for that machine and enable accelerated networking.
- “Saving NIC” is the part in the above screenshot where it is checked for an error, if there’s any, and marked in output to check the details.
- Following is the sample output excel sheet with details.
- This will be stored in your given path, example

C:\\Users\\sourabh.majali\\Downloads\\ExcelSheet\_Completed.xlsx"

![How script works](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/8.png?width=1450&height=387&name=8.png)  
Next step would be to check for the errors and resolve the issues accordingly and once this is done, you can check back for the status for all the machine at once if they are reflecting accelerated networking or not using the following script,

$vms= Get-AzVM  
foreach($vm in $vms)  
{  
    $nics=$vm.NetworkProfile.NetworkInterfaces  
        foreach($nic in $nics)  
    {  
        Write-Host "--------------------------"  
               $GetNICDetails= Get-AzNetworkInterface -ResourceId $nic.Id  
        Write-Host "Checking for ......." $vm.Name  
        if($GetNICDetails.EnableAcceleratedNetworking -eq "True")  
        {  
            Write-Host "Accelerated Networking is enabled.." -ForegroundColor White  
        }  
        else  
        {  
            Write-Host "Accelerated Networking NOT enabled.." -ForegroundColor Red  
         }  
    }  
}

Output

![Output](https://blog.e-zest.com/hs-fs/hubfs/Blog_Files/9.png?width=510&height=235&name=9.png)

Takeaways

In various situations, it becomes necessary to manage and work on multiple machines, sometimes exceeding 100 resources. However, handling these tasks manually can be extremely time-consuming and prone to human error. By automating such processes, significant amounts of time can be saved. Automation also allows for easy tracking of progress and identification of issues, facilitating quick resolution. Additionally, automation enables the creation of comprehensive reports, providing valuable insights into the overall operations.

- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet&text=How%20to%20Enable%20Accelerated%20Networking%20on%20NICs%20–%20Azure%20Virtual%20Machine%20using%20PowerShell%20+%20Excel%20sheet>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet>
- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/how-to-enable-accelerated-networking-on-nics-azure-virtual-machine-using-powershell-excel-sheet&title=&summary=&source=>

### Similar Blog

[![Enabling Azure Storage Management Lifecycle for Efficiency and Cost Optimization](https://blog.e-zest.com/hubfs/Banners/Enabling%20Azure%20Storage%20Management%20Lifecycle%20for%20Efficiency%20and%20Cost%20Optimization.jpg) Enabling Azure Storage Management Lifecycle for Efficiency and Cost Optimization Efficient data management is vital for all organizations, particularly as data continues to proliferate. Azure Storage Management ... By Sourabh Majali Sep 29, 2023](https://blog.e-zest.com/enabling-azure-storage-management-lifecycle-for-efficiency-and-cost-optimization)

[![How to shut down your Virtual Machine if it is idle for 'X' hours on the basis of CPU Utilization Percentage](https://blog.e-zest.com/hubfs/How%20To%20Shut%20Down%20Your%20Virtual%20Machine.jpg) How to shut down your Virtual Machine if it is idle for 'X' hours on the basis of CPU Utilization Percentage A Virtual Machine (VM) is an environment that replicates a physical machine, having its own allocation of processing unit, ... By Sourabh Majali Oct 05, 2020](https://blog.e-zest.com/auto-stop-your-vm-based-on-cpu-utilization)

[![Building Cloud First Apps Using Microsoft Azure](https://blog.e-zest.com/hubfs/blog-files/Building%20cloud%20first%20blog.png) Building Cloud First Apps Using Microsoft Azure The COVID-19 pandemic required most of the organizations to adopt a remote working environment. This made people realize the ... By Corporate Jul 06, 2020](https://blog.e-zest.com/building-cloud-first-apps-using-microsoft-azure)

[![Virtual Machine Scale Set in Azure Microsoft](https://blog.e-zest.com/hubfs/blog-files/virtual-machine-scale-set-in-azure-microsoft.jpg) Virtual Machine Scale Set in Azure Microsoft Virtual Machine Scale Set, an interesting service offered by Microsoft Azure, helps to create and manage a group of identical, ... By Surbhi Agarwal Jan 16, 2020](https://blog.e-zest.com/virtual-machine-scale-set-in-azure-microsoft)

[![Enabling Azure Storage Management Lifecycle for Efficiency and Cost Optimization](https://blog.e-zest.com/hubfs/Banners/Enabling%20Azure%20Storage%20Management%20Lifecycle%20for%20Efficiency%20and%20Cost%20Optimization.jpg) Enabling Azure Storage Management Lifecycle for Efficiency and Cost Optimization Efficient data management is vital for all organizations, particularly as data continues to proliferate. Azure Storage Management ... By Sourabh Majali Sep 29, 2023](https://blog.e-zest.com/enabling-azure-storage-management-lifecycle-for-efficiency-and-cost-optimization)

[![PowerShell – Assigning Tags to Azure Resources using Excel Sheet](https://blog.e-zest.com/hubfs/Banners/PowerShell%20%E2%80%93%20Assign%20Tags%20to%20Azure%20Resources%20using%20Excel%20Sheet%20V2-08_2x.jpg) PowerShell – Assigning Tags to Azure Resources using Excel Sheet Prerequisite By Sourabh Majali Aug 03, 2023](https://blog.e-zest.com/powershell-assigning-tags-to-azure-resources-using-excel-sheet)

[![How to shut down your Virtual Machine if it is idle for 'X' hours on the basis of CPU Utilization Percentage](https://blog.e-zest.com/hubfs/How%20To%20Shut%20Down%20Your%20Virtual%20Machine.jpg) How to shut down your Virtual Machine if it is idle for 'X' hours on the basis of CPU Utilization Percentage A Virtual Machine (VM) is an environment that replicates a physical machine, having its own allocation of processing unit, ... By Sourabh Majali Oct 05, 2020](https://blog.e-zest.com/auto-stop-your-vm-based-on-cpu-utilization)

[![Integration of your Web App with Virtual Network](https://blog.e-zest.com/hubfs/blog-files/Integration%20of%20Web%20App%20with%20Virtual%20Network-190822%20(1).png) Integration of your Web App with Virtual Network This blog describes how to connect **Web App** with **Virtual Network**. This integration allows your WebApp to get access to all ... By Sourabh Majali Aug 29, 2019](https://blog.e-zest.com/integration-of-your-web-app-with-virtual-network)

## Helping Organizations Thrive in the Digital Age

[Contact Us](https://www.e-zest.com/contact-us)

- [About](https://www.e-zest.com/about-us)
- [Services](https://www.e-zest.com/our-services)
- [Work](https://www.e-zest.com/our-work)
- [Insights](https://blog.e-zest.com/)
- [Healthcare](https://healthcare.e-zest.com/)
- [Accion Labs](https://www.accionlabs.com/)

- <https://www.linkedin.com/company/e-zest-solutions/>
- <https://twitter.com/ezest>
- <https://www.facebook.com/eZest/>
- <https://www.instagram.com/ezestsolutions/>
- <https://www.youtube.com/user/ezestcorporate>

- Dallas
- Detroit
- Hannover
- Vienna
- London
- Pune

 © 2025 e-Zest Solutions

- [Privacy Policy](https://www.e-zest.com/privacypolicy)
- [Cookie Policy](https://www.e-zest.com/cookie-policy)

 Contact us

 Contact us

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.